Skip to main content
Glama

Agent Spend Guard — owner-set purchasing guardrails

spend_guard_set_rules

Idempotent

Humans: sign up with your email at https://a2awire.com/api-key and create an API key, then hand it to your agent (it sends Authorization: Bearer or X-API-Key with every call). Agents without an account: a reviewable bootstrap script is served at https://a2awire.com/api/v1/connectors/spend-guard/bootstrap.sh (download it, read it, then run it to mint a key). Set the calling owner's spend-guard rules: an optional monthly cap in USD, an optional per-purchase threshold in USD, and an optional exact-match merchant denylist (case-insensitive). Full declaration: omit or null a field to clear that rule. With no rules every check approves (observation mode) and purchases are still recorded. Returns the effective rules. Not guest-callable. REST: PUT /api/v1/spend-guard/rules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
monthly_cap_usdNoCumulative recorded spend per UTC calendar month at or above which checks deny. Null clears the cap.
merchant_denylistNoExact-match merchant names (case-insensitive) whose purchases are denied, up to 100 entries. Null clears the list.
per_purchase_threshold_usdNoA single purchase strictly above this amount asks the user first. Null clears the threshold.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Beyond annotations (idempotent, non-destructive, readOnlyHint=false), the description adds critical behavioral details: authentication requirement (not guest-callable), the clearing semantics (omit/null clears a rule), the observation-mode default when no rules exist, and the return value (effective rules). This goes beyond what annotations provide.

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?

The description is relatively long but every sentence earns its place: it includes auth setup, rule specifics, clearing behavior, default mode, return value, and the REST endpoint. The opening sentence focuses on human sign-up, which is important for authentication but delays the primary purpose; still, it is well-structured and not redundant.

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

Completeness4/5

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

Given the tool's complexity (multiple optional rules, clearing, observation mode, auth, no output schema), the description is comprehensive. It covers what the tool does, how to invoke it (REST method), the authentication prerequisite, the behavior of each rule, and the return. The only minor gap is a more explicit return format, but 'Returns the effective rules' suffices for an agent.

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% and each parameter already has a detailed description (maximum, exclusiveMinimum, null-clearing semantics). The tool description restates the rule names but does not add new meaning to the parameters themselves; the schema carries the full burden, 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 clearly states the verb (set), the resource (the calling owner's spend-guard rules), and the specific rule types (monthly cap, per-purchase threshold, merchant denylist). It distinguishes this from siblings by naming the operation (set rules) versus check, record, and report.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: to configure rules for the authenticated owner. It explains the clearing behavior and the observation-mode default, but does not explicitly compare to sibling tools. The distinction is implicit given the operation names.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources