Skip to main content
Glama

xpayr_update_ai_agent_policy

Set or update spending policy rules for an AI commerce agent, including per-transaction and daily USD caps, auto-approve thresholds, and allowed blockchain networks/tokens.

Instructions

Upsert spending policy rules for an AI commerce agent, including maximum per-transaction USD amount, daily budget cap, auto-approve threshold, and allowed blockchain networks/tokens.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "agent_id": "<agent_id>"
    },
    "name": "xpayr_update_ai_agent_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
agent_idYesPublic ID of the target AI agent.
max_tx_amountNoMaximum allowed single transaction amount in USD.
allowed_networksNoList of permitted blockchain network keys.
allowed_currenciesNoList of permitted token symbols (e.g., ["USDC", "USDT"]).
auto_approve_underNoTransactions below this USD amount are auto-approved; higher amounts enter the human approval queue.
daily_limit_amountNoMaximum daily cumulative spend in USD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full burden and does not meet it. It never says whether an upsert replaces the entire policy or merges with existing rules, whether omitted fields are cleared or left untouched, who is authorized to change policy, or how the new limits interact with already-pending payment intents — all material for a mutation that gates an agent's spending.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that names the action first and then the policy fields; nothing is padded or redundant. It could be tightened only marginally.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

All six parameters are fully described in the schema and the description summarizes them, so an agent can construct a valid call. What is missing for a mutation tool with no annotations and no output schema is the replace-vs-merge contract and the resulting policy state after the call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter is already documented, including the useful auto-approve-vs-approval-queue nuance. The description restates those fields at a high level without adding format, range, default, or interaction semantics beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource pair, 'Upsert spending policy rules for an AI commerce agent,' and enumerates the policy dimensions (per-transaction max, daily cap, auto-approve threshold, allowed networks/tokens). No sibling in the catalog manages agent policy, so an agent can tell this apart from the payment-intent and webhook tools without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no mention of prerequisites (e.g., that agent_id must reference an already-created agent), and no stated alternative or exclusion. The word 'Upsert' implies create-or-update behavior but the description never confirms it or explains which case applies.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.