Skip to main content
Glama

spend_protect

Check each payment operation against dry-run, budget, blacklist, whitelist, frequency, and single-limit gates. Approve with ok=true or reject with ok=false and a reason.

Instructions

保护一次花钱操作。走干跑/预算/黑名单/白名单/频率/单次上限闸门。通过返回 ok=true; 被拦返回 ok=false + reason

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYes收款方, 如 麦当劳/xxx@example.com
agentNo调用方 Agent 身份 ID(未注册默认拒绝, 建议必填)
actionYes操作名, 如 下单/转账/充值
amountYes金额(元)
Behavior3/5

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

With no annotations provided, the description carries the full burden, and it does disclose meaningful behavior: the six gate types it runs and the ok=true / ok=false + reason return contract. However, it leaves ambiguity about whether the tool actually executes the spend or only checks it, and it does not disclose side effects, state changes, or whether a successful pass records anything. The gate list and return semantics earn a 3, but the execute-vs-check ambiguity prevents a higher score.

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

Conciseness5/5

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

Two sentences with zero filler. The first sentence front-loads the purpose and the gate list; the second specifies the binary return contract. Every clause earns its place, and the most important behavioral detail (blocked => ok=false + reason) is stated explicitly.

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?

The description compensates for the missing output schema by explicitly defining the return values (ok=true vs ok=false+reason), and the flat 4-parameter schema is fully documented. But for a financial safety-gate tool with no annotations, it should also clarify whether the spend is executed by this tool, how an agent should route to a sibling on different needs, and what action to take on a block. The core is covered; these decision-relevant gaps hold it at a 3.

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%: all four parameters (to, agent, action, amount) already carry meaningful Chinese descriptions in the schema, including the behavioral note that unregistered agents are rejected by default. The tool description adds no parameter-specific meaning beyond the schema, so the baseline of 3 applies.

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

Purpose5/5

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

The description states a specific verb plus resource: '保护一次花钱操作' (protect a spending operation), then enumerates concrete gates (干跑/预算/黑名单/白名单/频率/单次上限) and the exact return contract. This clearly differentiates it from siblings spend_status, spend_audit, spend_reset, and secret_get — an agent can tell this is the pre-spend guard without opening any schema.

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

Usage Guidelines3/5

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

The gate list strongly implies the usage: run this before spending money to test the operation against budget/blacklist/whitelist/frequency/single-limit policies. However, there is no explicit when-to-use vs alternatives, no wording like 'for balance/status checks use spend_status instead,' and no statement about what to do when ok=false (e.g., abort). Usage is implied, not stated.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/felixpg13-glitch/spendshield'

If you have feedback or need assistance with the MCP directory API, please join our Discord server