A local, deterministic MCP evaluator for agent spend-policy eligibility. It never holds funds, keys, or payment credentials.
Single tool with well-structured schema and clear purpose. Tool name 'evaluate_spend_policy' is verb-noun and descriptive. Description (158 chars) is concise and explains the deterministic, read-only nature. Input schema is comprehensive with Zod validation for all parameters. Output schema documents outcome enum and reasonCode. Tool annotations (readOnlyHint, idempotentHint) are present and correct. Main gaps: parameter descriptions in the schema are generic (e.g., 'Spend policy object' for policy param); no error handling guidance in description; no examples of valid/invalid inputs to guide LLM usage.
Deterministically evaluates a proposed action against caller-supplied policy. This is local policy evidence only: it never authorizes, signs, sends, settles, custodies, or records a payment.
Parameter descriptions lack actionable detail. 'Spend policy object' and 'Payment action to evaluate' are too generic. LLMs need specifics: what fields are required vs optional, what constraints apply (e.g., 'allowedRails must have at least 1 entry'), and what happens if constraints are violated.
No error recovery guidance in tool description. The tool returns DENY/STEP_UP/ELIGIBLE outcomes, but the description does not explain when each occurs or what the LLM should do next (e.g., 'If STEP_UP, request additional authorization from the user').
Nested object parameters (policy, action) lack field-level descriptions in the schema. While Zod validators exist in code, the JSON schema exposed to the LLM does not include descriptions for nested fields like 'expectedPrincipalId', 'allowedRails', 'amountMicros'. LLMs cannot infer field semantics from names alone.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 62 | 2025-06-18+ | v2 |
Output schema in code shows enum and reasonCode, but the tool description does not document what reasonCode values are possible (e.g., PRINCIPAL_MISMATCH, EXPIRED_ACTION, ZERO_AMOUNT, etc.). LLMs need to know the full set of outcomes to reason about next steps.
No guidance on when to call this tool vs. other spend-policy tools (if any exist). The description should clarify: 'Call this to check if a proposed payment meets local policy constraints before submitting for authorization. This tool does not execute payments or check real-time balances.'