Skip to main content
Glama

Agent Budget Guard

wever_agent-budget-guard

Paid URL: 0.10 USDC per call on Base; 10 signed-wallet free calls shared over rolling 30 days. Read the backend 402 body for x402 terms. Compare a proposed request with the policy, usage and budget values you supply and return an allow-or-deny preview. Operating boundary: Supply policy, usage and request values. Read the preview and reasons. An agent checks the preview before the payment flow; a human sets the budget and approves any exception. POST /api/agent-budget-guard. Existing product credentials, signed mandates, and single-use action grants remain required where applicable. This adapter grants no authority and never supplies server credentials. This current money service follows its published inspection, policy evaluation or private invoice contract. Payment is an API access fee and grants no spending authority.

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": {
      "mode": "<mode>",
      "agent_id": "<agent_id>",
      "policy": "<policy>",
      "usage": "<usage>",
      "request": "<request>"
    },
    "name": "wever_agent-budget-guard"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes
usageYes
policyYes
requestYes
agent_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • changedInput schema / additionalProperties
      Previous value: -trueNew value: +false
    • removedInput schema / description
      Removed value: -"The existing product POST body. Supply its documented mode, arguments, and required signed authority or grant. The product validates its full contract."
    • removedInput schema / maxProperties
      Removed value: -64
    • removedInput schema / minProperties
      Removed value: -1
    • addedInput schema / properties / agent_id
      Added value: +{
      +  "maxLength": 64,
      +  "minLength": 1,
      +  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}(?![\\s\\S])",
      +  "type": "string"
      +}
    • addedInput schema / properties / mode / const
      Added value: +"evaluate_action"
    • removedInput schema / properties / mode / maxLength
      Removed value: -128
    • removedInput schema / properties / mode / minLength
      Removed value: -1
    • removedInput schema / properties / mode / type
      Removed value: -"string"
    • addedInput schema / properties / policy
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "agent_id": {
      +      "maxLength": 64,
      +      "minLength": 1,
      +      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}(?![\\s\\S])",
      +      "type": "string"
      +    },
      +    "allowed_callback_origins": {
      +      "items": {
      +        "description": "Canonical HTTPS origin only, with no path, trailing slash, credentials, query or fragment. Matching uses the parsed request URL origin; no destination is contacted.",
      +        "maxLength": 256,
      +        "minLength": 9,
      +        "type": "string"
      +      },
      +      "maxItems": 16,
      +      "minItems": 0,
      +      "type": "array",
      +      "uniqueItems": true
      +    },
      +    "allowed_rails": {
      +      "items": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}(?![\\s\\S])",
      +        "type": "string"
      +      },
      +      "maxItems": 16,
      +      "minItems": 0,
      +      "type": "array",
      +      "uniqueItems": true
      +    },
      +    "budget_minor": {
      +      "maximum": 1000000000000,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "callback_required": {
      +      "type": "boolean"
      +    },
      +    "currency": {
      +      "const": "USD"
      +    },
      +    "expires_at": {
      +      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z(?![\\s\\S])",
      +      "type": "string"
      +    },
      +    "max_action_fee_minor": {
      +      "maximum": 1000000000000,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "max_runs": {
      +      "maximum": 1000000,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "not_before": {
      +      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z(?![\\s\\S])",
      +      "type": "string"
      +    },
      +    "policy_id": {
      +      "maxLength": 64,
      +      "minLength": 1,
      +      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}(?![\\s\\S])",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "policy_id",
      +    "agent_id",
      +    "currency",
      +    "budget_minor",
      +    "max_action_fee_minor",
      +    "max_runs",
      +    "allowed_rails",
      +    "allowed_callback_origins",
      +    "callback_required",
      +    "not_before",
      +    "expires_at"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / request
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "callback_url": {
      +      "anyOf": [
      +        {
      +          "description": "ASCII HTTPS URL without credentials, control characters, backslashes or fragment. Its normalized origin is compared exactly with allowed_callback_origins. No request is sent.",
      +          "maxLength": 2048,
      +          "minLength": 9,
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "fee_minor": {
      +      "description": "Total fee for this action request in USD cents, including all requested runs. It is not multiplied by run_count.",
      +      "maximum": 1000000000000,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "rail_key": {
      +      "maxLength": 64,
      +      "minLength": 1,
      +      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}(?![\\s\\S])",
      +      "type": "string"
      +    },
      +    "run_count": {
      +      "maximum": 1000000,
      +      "minimum": 1,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "rail_key",
      +    "fee_minor",
      +    "run_count",
      +    "callback_url"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / usage
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "as_of": {
      +      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z(?![\\s\\S])",
      +      "type": "string"
      +    },
      +    "spent_minor": {
      +      "maximum": 1000000000000,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "used_runs": {
      +      "maximum": 1000000,
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "spent_minor",
      +    "used_runs",
      +    "as_of"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / required
      Added value: +[
      +  "mode",
      +  "agent_id",
      +  "policy",
      +  "usage",
      +  "request"
      +]
  2. First observed

TDQS

A3.5/5.0
Behavior4/5

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

The description adds real context beyond annotations: paid access terms (0.10 USDC per call, 10 free calls per rolling 30 days), that credentials, signed mandates and single-use grants are still required, that no server credentials are supplied, and that payment confers no spending authority. This is valuable for an openWorldHint=true tool, though the pricing boilerplate overshadows the actual evaluation semantics.

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

Conciseness3/5

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

The core purpose appears only in the second sentence, behind pricing and payment boilerplate that belongs in a footnote. The 'grants no authority' idea is restated twice ('This adapter grants no authority' and 'Payment is an API access fee and grants no spending authority'), padding an otherwise short description.

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?

With no output schema, the description does convey that the return is an allow-or-deny preview plus reasons, which is helpful. However, for a tool with five required nested-object parameters and zero schema descriptions, it omits the input contract details an agent needs to construct a valid evaluation request.

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

Parameters2/5

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

Schema description coverage is 0% and the five required parameters are deeply nested, yet the description only says to 'supply policy, usage and request values' without explaining any field. It gives no guidance on units (minor/cents), the fee_minor versus run_count relationship, mode, or how policy fields like budget_minor and max_action_fee_minor drive the decision, so it fails to compensate for the coverage gap.

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 names a specific action and resource: 'Compare a proposed request with the policy, usage and budget values you supply and return an allow-or-deny preview,' plus the endpoint POST /api/agent-budget-guard. It is clear what the tool does, but it never contrasts itself with plausible siblings such as wever_payment-authority-inspector or wever_ap2-mandate-gateway, so differentiation must be inferred.

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?

'An agent checks the preview before the payment flow; a human sets the budget and approves any exception' gives a concrete when-to-use context and a division of responsibility. It stops short of naming an alternative tool or an explicit when-not-to-use condition.

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.