Skip to main content
Glama

Tinplate AI Agent Security & Guardrails MCP

tinplate_x402_spend_guard

Read-onlyIdempotent

Inspect x402 HTTP 402 payment challenges and agent spend budgets offline in volatile RAM for over-cap quotes, unknown assets, testnets, unlisted recipients, resource SSRF, and velocity anomalies. (Endpoint: POST /v1/x402-spend-guard)

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": {
      "payment_required": "<payment_required>"
    },
    "name": "tinplate_x402_spend_guard"
  }
}

Input Schema

NameRequiredDescriptionDefault
policyNoCaller spend, network, asset, recipient, and timeout policy.
recent_paymentsNoOptional recent payment log entries to detect rapid drain loops or replayed nonces offline.
payment_requiredYesx402 v1/v2 402 JSON body or Base64-encoded PAYMENT-REQUIRED header value to inspect before signing a payment authorization.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • removedInput schema / properties / payment_required / example
      Removed value: -{
      -  "accepts": [
      -    {
      -      "amount": "500",
      -      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      -      "maxTimeoutSeconds": 60,
      -      "network": "eip155:8453",
      -      "payTo": "0x54d2b9bd239970e227b87c8d4e84c8ba33e42ddb",
      -      "scheme": "exact"
      -    }
      -  ],
      -  "error": "Payment required",
      -  "resource": {
      -    "description": "Tinplate Prompt Guard",
      -    "mimeType": "application/json",
      -    "url": "https://api.tinplate.dev/v1/prompt-guard"
      -  },
      -  "x402Version": 2
      -}
    • removedInput schema / properties / policy / example
      Removed value: -{
      -  "allow_testnets": false,
      -  "allowed_networks": [
      -    "eip155:8453"
      -  ],
      -  "max_per_call_usd": 0.05,
      -  "max_session_usd": 1,
      -  "session_spent_usd": 0.02
      -}
    • removedInput schema / properties / policy / properties / allow_testnets / example
      Removed value: -false
    • removedInput schema / properties / policy / properties / allowed_networks / example
      Removed value: -[
      -  "eip155:8453"
      -]
    • removedInput schema / properties / policy / properties / daily_spent_usd / example
      Removed value: -0.1
    • removedInput schema / properties / policy / properties / expected_scheme / example
      Removed value: -"exact"
    • removedInput schema / properties / policy / properties / max_daily_usd / example
      Removed value: -5
    • removedInput schema / properties / policy / properties / max_per_call_usd / example
      Removed value: -0.05
    • removedInput schema / properties / policy / properties / max_session_usd / example
      Removed value: -1
    • removedInput schema / properties / policy / properties / max_timeout_seconds / example
      Removed value: -300
    • removedInput schema / properties / policy / properties / session_spent_usd / example
      Removed value: -0.02
    • removedInput schema / properties / recent_payments / example
      Removed value: -[]
  2. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the baseline is covered. The description adds meaningful context beyond that: processing happens offline in volatile RAM and the check covers six specific risk classes. It still does not describe the return shape or what happens when a violation is detected.

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 definition is front-loaded with the core action and packs the anomaly categories efficiently into one sentence, followed by the endpoint. It is appropriately sized and free of filler, though the first sentence is dense with a six-item list.

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?

For a tool with a nested policy object and no output schema, the description explains what is inspected but not what is returned or how violations are surfaced. Parameter semantics are covered by the schema, but return-value behavior and explicit invocation context remain gaps.

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 the nested policy and recent_payments fields are already well documented. The description adds only high-level framing ('agent spend budgets') and no additional syntax, defaults, or interaction guidance beyond the schema, which makes the baseline 3 appropriate.

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 uses a specific verb and resource: 'Inspect x402 HTTP 402 payment challenges and agent spend budgets offline in volatile RAM.' It also enumerates the anomaly classes checked, making the tool's domain clear. It stops short of explicitly differentiating itself from sibling guard tools, so it lands at 4 rather than 5.

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?

Usage is implied by 'Inspect ... before signing' in the payment_required schema description and by the listed anomaly categories, but the main description gives no explicit when-to-use or when-not-to-use guidance and names no alternatives among the many sibling guard tools.

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.