Skip to main content
Glama

plan_flow_with_credits

Plan a flow of paid x402 services for a goal, paid with $0.02 of platform credits. Credential: a full-access Studio token (sgl_pat_, mcp:) or a Singularity Cloud API key with compute:write and spend. Nothing found = not charged. Use the same idempotencyKey to retry without a second charge.

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>"
    },
    "name": "plan_flow_with_credits"
  }
}

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
accessTokenNoFull-access Studio token (sgl_pat_*)
computeApiKeyNoSingularity Cloud API key with compute:write and spend
idempotencyKeyNoYour id for this request; a retry with the same id and goal is never charged twice

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description bears the full burden, and it does well on cost ($0.02 of credits), credential scopes (mcp:* or compute:write and spend), the no-charge-on-empty-result rule, and idempotent retries. What it omits is whether planning merely produces a plan or also executes/spends downstream, and whether the $0.02 is charged up front or only on success. Those are material for a spending operation.

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?

Four short sentences, front-loaded with the action and price, then credentials, then the two billing guarantees. Nothing is filler. The telegraphic 'Nothing found = not charged' style is slightly terse but reads cleanly and saves space.

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 credit-spending planning tool with no output schema, the description covers the essentials an agent needs before calling: cost, credential requirements, failure billing, and retry behavior. It falls short on the return shape (what a 'flow of paid x402 services' looks like) and on distinguishing itself from the payment-based sibling, which matters given the cost implications of picking wrong.

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 baseline is 3, but the description adds meaning the schema lacks: it specifies the exact credential scopes required (mcp:*, compute:write and spend) for accessToken and computeApiKey, and it confirms the idempotencyKey semantics ('same id and goal is never charged twice'). The goal/maxSteps/networks/budgetUsd parameters get no extra explanation, but the schema handles those adequately.

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 gives a specific verb and resource: it plans a flow of paid x402 services for a stated goal and pays for the planning with $0.02 of platform credits. That's much clearer than a generic 'plan' tool. The one gap: a sibling named plan_flow_with_payment exists, and the description never says how credits-based planning differs from payment-based planning.

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 signals are implied rather than stated: the credit cost and credential requirements suggest when this tool is appropriate. The retry guidance with idempotencyKey is a concrete usage instruction. But there's no explicit 'use this instead of X' statement, and with a near-identically named sibling (plan_flow_with_payment) the agent is left to infer the routing.

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