Skip to main content
Glama
Replaced by its MCP Registry listing

This endpoint is listed in the official MCP Registry as Machine Utility Foundry (x402 + ICP Trust & Safety Oracles). If you published it, claim ownership there.

stateful_budget_guard_icp

[x402 Paid: $0.005 Base USDC] Enforce payer-isolated stateful shared spending caps and atomic nonce replay protection across multi-agent swarms on Internet Computer (ICP).

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": {
      "vaultId": "<vaultId>",
      "agentId": "<agentId>",
      "nonce": "<nonce>",
      "action": "<action>",
      "amountMicroUsd": "<amountMicroUsd>",
      "budgetCapMicroUsd": "<budgetCapMicroUsd>"
    },
    "name": "stateful_budget_guard_icp"
  }
}

Input Schema

NameRequiredDescriptionDefault
nonceYesUnique idempotency/replay-protection nonce for this spend attempt (7-day on-chain TTL).
actionYesShort action label describing the intended expenditure (e.g. x402_api_call).
agentIdYesIdentifier of the autonomous agent worker requesting spend approval.
vaultIdYesLogical budget vault identifier isolated under the verified x402 payer address (1..64 chars).
amountMicroUsdYesRequested spend amount in micro-USD (1 USD = 1,000,000 micro-USD).
budgetCapMicroUsdYesMaximum cumulative spending cap for this vault in micro-USD.
maxSingleMicroUsdNoOptional per-transaction spending ceiling in micro-USD.

Output Schema

NameRequiredDescriptionDefault
nonceYes
reasonYes
vaultIdYes
decisionYes
onChainProofNo
decisionSha256Yes
opaqueVaultKeyYes
payerNamespaceYes
replayDetectedYes
remainingMicroUsdYes
stateAnchoredOnChainYes
cumulativeSpentMicroUsdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / action / description
      Added value: +"Short action label describing the intended expenditure (e.g. x402_api_call)."
    • addedInput schema / properties / action / maxLength
      Added value: +128
    • addedInput schema / properties / agentId / description
      Added value: +"Identifier of the autonomous agent worker requesting spend approval."
    • addedInput schema / properties / agentId / maxLength
      Added value: +128
    • addedInput schema / properties / amountMicroUsd / description
      Added value: +"Requested spend amount in micro-USD (1 USD = 1,000,000 micro-USD)."
    • addedInput schema / properties / budgetCapMicroUsd / description
      Added value: +"Maximum cumulative spending cap for this vault in micro-USD."
    • addedInput schema / properties / maxSingleMicroUsd / description
      Added value: +"Optional per-transaction spending ceiling in micro-USD."
    • addedInput schema / properties / nonce / description
      Added value: +"Unique idempotency/replay-protection nonce for this spend attempt (7-day on-chain TTL)."
    • addedInput schema / properties / nonce / maxLength
      Added value: +128
    • addedInput schema / properties / vaultId / description
      Added value: +"Logical budget vault identifier isolated under the verified x402 payer address (1..64 chars)."
  2. Changed5 schema fields changed
    • addedInput schema / properties / amountMicroUsd / minimum
      Added value: +0
    • addedInput schema / properties / budgetCapMicroUsd / minimum
      Added value: +1
    • addedInput schema / properties / maxSingleMicroUsd / minimum
      Added value: +0
    • addedInput schema / properties / vaultId / pattern
      Added value: +"^[a-zA-Z0-9._:-]{1,64}$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "cumulativeSpentMicroUsd": {
      +      "type": "integer"
      +    },
      +    "decision": {
      +      "enum": [
      +        "ALLOW",
      +        "DENY"
      +      ],
      +      "type": "string"
      +    },
      +    "decisionSha256": {
      +      "type": "string"
      +    },
      +    "nonce": {
      +      "type": "string"
      +    },
      +    "onChainProof": {
      +      "properties": {
      +        "network": {
      +          "enum": [
      +            "icp"
      +          ],
      +          "type": "string"
      +        },
      +        "timestampNs": {
      +          "type": "string"
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "opaqueVaultKey": {
      +      "type": "string"
      +    },
      +    "payerNamespace": {
      +      "type": "string"
      +    },
      +    "reason": {
      +      "type": "string"
      +    },
      +    "remainingMicroUsd": {
      +      "type": "integer"
      +    },
      +    "replayDetected": {
      +      "type": "boolean"
      +    },
      +    "stateAnchoredOnChain": {
      +      "type": "boolean"
      +    },
      +    "vaultId": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "decision",
      +    "reason",
      +    "stateAnchoredOnChain",
      +    "payerNamespace",
      +    "vaultId",
      +    "opaqueVaultKey",
      +    "nonce",
      +    "cumulativeSpentMicroUsd",
      +    "remainingMicroUsd",
      +    "replayDetected",
      +    "decisionSha256"
      +  ],
      +  "type": "object"
      +}
  3. Added

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare the mutation and open-world profile, but the description adds genuinely useful context: payer-isolated vaults, stateful cumulative caps, and atomic nonce replay protection, plus the $0.005 x402 cost. It does not say what happens when a cap is exceeded (rejection vs. partial spend), which is the main remaining behavioral gap.

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 dense sentence with the price tag front-loaded and the enforcement scope immediately after. No filler, though the phrase 'across multi-agent swarms' is somewhat decorative.

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?

Output schema exists, so return values need not be explained, and annotations plus full schema coverage carry most of the load. However, for a spend-authorization tool with six required parameters, the description omits failure semantics (cap exceeded, duplicate nonce, unauthorized payer) that an agent needs to handle responses correctly.

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 coverage is 100%, so field meanings are fully documented in the schema. The description only adds the payer-isolation framing that links vaultId to the verified x402 payer and the replay-protection framing for nonce, which is marginal beyond the schema's own nonce description (7-day TTL).

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?

States a specific verb and resource: 'Enforce payer-isolated stateful shared spending caps and atomic nonce replay protection.' The 'on Internet Computer (ICP)' qualifier and 'multi-agent swarms' scope help distinguish it from the EVM guard sibling, though no sibling is named explicitly.

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?

No explicit when-to-use or when-not guidance. The caller must infer from 'multi-agent swarms on ICP' that this is for stateful cumulative budget enforcement rather than a one-off preflight check, and nothing routes the agent between this tool and guard_evm_preflight_base.

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