Skip to main content
Glama

AgentPay — trust routing + spend caps for x402 agents

estimate_plan

Read-only

Price a multi-tool plan BEFORE spending anything. Submits the tool calls an agent intends to make to the gateway's free /v1/plan/estimate and returns per-step cost, total, a fits-budget verdict, and a cheaper alternative per paid step. No payment, no wallet needed. Use when: planning a multi-step task with paid tools, "what would this cost", "does this plan fit my budget", or before committing a Session cap.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepsYesTool names to price, in order, e.g. ["token_price", "dune_query", "session_create"]
budgetNoOptional USDC budget for the fits_budget verdict, e.g. 0.05

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=true, so the safety side rests on structured data. The description adds real behavioral value beyond that: the call is free, requires no payment or wallet, and returns per-step cost, a total, a fits-budget verdict, and a cheaper alternative per paid step. It does not discuss rate limits or failure modes, keeping it short of a 5.

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 leading imperative 'Price a multi-tool plan BEFORE spending anything' front-loads the core value, followed by mechanics and then a routing clause. Every sentence carries information, though the 'Use when' list is slightly verbose for the amount of content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description compensates by naming the exact return fields (per-step cost, total, fits-budget verdict, cheaper alternative per paid step). Combined with the no-payment prerequisite, an agent has everything needed to call and interpret this tool.

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 both `steps` (ordered tool names, with an example) and optional `budget` (USDC, with an example) are already documented in the schema. The description's mention of the budget verdict adds framing but no syntax or format detail beyond the schema. Baseline 3 applies.

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 specific verb+resource (price a multi-tool plan) and a clear temporal scope (BEFORE spending anything). It is readily distinguishable from siblings like session_create (which commits a cap) and pre_trade_check (single-trade validation).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'Use when' clause enumerates the triggering scenarios: multi-step planning with paid tools, 'what would this cost', budget-fit questions, and pre-commitment before a Session cap. The alternative (session_create) is implicitly referenced via the Session-cap language.

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.