Skip to main content
Glama

macaroons_execute

Executes a paid marketplace capability by ID, settles USDC on Base only when the acceptance predicate passes, and returns payment terms if no wallet is configured.

Instructions

Execute a paid marketplace capability by capability_id using x402 USDC on Base. Payment only settles if the acceptance predicate passes against the bridge response; bridge errors and predicate failures refund. If no wallet is configured (the default), returns x402_payment_required with the real payment terms for you to pay/sign yourself.

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": {
      "capability_id": "<capability_id>",
      "input": "<input>"
    },
    "name": "macaroons_execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesCapability input payload matching the listing input_schema.
predicateNoOptional acceptance predicate. Defaults to the listing's sample_predicate when omitted.
capability_idYesRegistry capability_id, e.g. 'polymathica-heated-channel-v1'.
payment_signatureNoOnly set this after a prior call returned x402_payment_required and you've since signed the exact-scheme USDC payment it described with your own wallet — set it to the resulting signed proof. Omit on a first attempt.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.0
    • removedInput schema / properties / max_spend_sats
      Removed value: -{
      -  "default": 100,
      -  "description": "Hard per-call spend cap in satoshis.",
      -  "type": "integer"
      -}
    • addedInput schema / properties / payment_signature
      Added value: +{
      +  "description": "Only set this after a prior call returned x402_payment_required and you've since signed the exact-scheme USDC payment it described with your own wallet — set it to the resulting signed proof. Omit on a first attempt.",
      +  "type": "string"
      +}
    • removedInput schema / properties / resume_macaroon
      Removed value: -{
      -  "description": "Only set this after a prior call returned payment_required and you've since paid that invoice with your own wallet — set it to the macaroon that call returned. Omit on a first attempt.",
      -  "type": "string"
      -}
  2. First observedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the settlement condition (payment settles only if the acceptance predicate passes against the bridge response) and the refund behavior on bridge errors and predicate failures. The default no-wallet path returning x402_payment_required is also spelled out. It omits rate limits and what a successful response contains.

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?

Three sentences, front-loaded with the action and payment mechanism, then settlement/refund semantics, then the fallback path. Every sentence carries distinct information with no repetition of schema content.

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?

For a payable, nested-input tool with no output schema, the description covers the risk model (charge, refund, unpaid fallback) that an agent most needs before calling. It does not describe the shape of a successful result or the bridge response format, which is a modest gap.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents all four parameters and the baseline would be 3. The description earns extra credit by explaining the sequencing that governs payment_signature (only after a prior x402_payment_required response) and the default-state condition that produces that response.

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?

States a concrete verb and resource — 'Execute a paid marketplace capability by capability_id' — plus the payment rail (x402 USDC on Base). This clearly separates it from the discovery-oriented siblings (search, categories, metadata, sources) without needing to name them.

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?

Gives a clear two-step usage model: a first attempt without a signature, then a retry with payment_signature only after an x402_payment_required response. It never explicitly routes the agent to a sibling for capability discovery or states when not to use it, so it stops short of a 5.

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