Skip to main content
Glama

pretrade_context

Refresh wallet, allowance, gas, price, 24h statistics and top-of-book context immediately before each automated trade or payment. Costs $0.01 USDC on Base via x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYes
networkNo
spenderYes
product_idYes
balance_tokensNo
token_contractYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses a real behavioral trait the schema cannot: it costs $0.01 USDC on Base via x402, so the agent knows this is a paid call. However, it says nothing about return shape, freshness/snapshot semantics, or failure modes, leaving significant gaps for a paid composite tool.

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?

Two tight sentences with the purpose front-loaded and the cost detail trailing. Every clause earns its place; nothing is padded.

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

Completeness2/5

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

A six-parameter, four-required tool with no annotations and no output schema needs more than it gets. Parameter intent and the returned context bundle are undocumented, so an agent cannot confidently construct a correct call from the definition alone.

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

Parameters2/5

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

Schema description coverage is 0% across 6 parameters (address, spender, token_contract, product_id, network, balance_tokens), so the description is expected to compensate and does not. The listed resources loosely hint at what is gathered but map to no specific parameter, leaving required inputs like product_id and spender unexplained.

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 clear verb (Refresh) and enumerates the specific resources aggregated: wallet, allowance, gas, price, 24h statistics, and top-of-book context. It distinguishes itself from the many narrow siblings (chain-erc20-allowance, chain-gas-state, crypto-top-of-book) by being the combined pre-trade snapshot, though it never names those alternatives explicitly.

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?

Explicitly states when to call it: 'immediately before each automated trade or payment.' That timing condition is exactly the routing signal an agent needs. It stops short of naming the narrower per-data-source siblings as fallbacks when only one metric is wanted.

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.