Skip to main content
Glama

plan_flow_with_payment

Plan a flow of paid x402 services for a goal, paid with a signed x402 payment ($0.02, USDC on Base or Solana). Settled only after a plan is produced; nothing found = not charged. If the answer is settlement_pending, do NOT pay again.

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": {
      "goal": "<goal>",
      "paymentPayload": "<paymentPayload>"
    },
    "name": "plan_flow_with_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalYesWhat you want done, in plain words (3 to 600 characters)
maxStepsNoAt most this many steps (1 to 5)
networksNoOnly services payable on these networks, e.g. ["base","solana"]
budgetUsdNoWarn when one run of the flow would cost more than this
paymentPayloadYesThe signed x402 payment (v2 relayed as PAYMENT-SIGNATURE, v1 as X-Payment), as JSON or base64

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / paymentPayload / description
      Previous value: -"The signed X-Payment payload, as JSON or base64"New value: +"The signed x402 payment (v2 relayed as PAYMENT-SIGNATURE, v1 as X-Payment), as JSON or base64"
  2. Added

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the whole burden. It does disclose cost ($0.02, USDC on Base or Solana), conditional settlement, the no-charge-on-empty-result rule, and retry safety for settlement_pending, but says nothing about auth requirements, idempotency of repeated paymentPayload submissions, latency, or what the returned plan looks like.

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 short sentences ordered by importance: what it does, how billing works, and the one failure mode to avoid. Nothing is wasted and the retry warning is placed last for emphasis.

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 paid, mutation-like planning tool with no annotations and no output schema, the definition covers cost, settlement timing, and the dangerous retry case. It leaves the shape of the returned plan and the full set of settlement statuses unstated, which is a modest gap given there is no output schema to lean on.

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 every parameter is already documented, which sets the baseline at 3. The description adds only the price/currency/network context relevant to paymentPayload, and does not clarify budgetUsd warning behavior or how networks filters the flow beyond what the schema says.

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 ('Plan a flow of paid x402 services for a goal') and pins the payment mechanism and price, which implicitly separates it from the credits-based sibling. It never names the alternative, so the differentiation is inferred rather than declared.

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?

The description is strong on post-call guidance (settled only after a plan is produced, no charge when nothing is found, do not re-pay on settlement_pending) but gives no explicit when-to-use versus when-not guidance against plan_flow_with_credits or request_flow_plan_payment.

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