Skip to main content
Glama

Can this wallet afford this call right now

payment_preflight
Read-onlyIdempotent

Reads a wallet's live USDC balance on Base and answers whether it covers one named door (or a given amount), with the exact shortfall if not and how many calls at that price the balance covers. Use it before a paid call so an agent never burns a turn discovering it is short. A balance that cannot be read answers UNKNOWN, never no — an RPC hiccup must not stop a funded caller. Read-only: it checks a public balance, holds nothing, and charges nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesThe 0x… address that would pay. The ADDRESS only, never a private key.
endpointNoA door name from payment_options, e.g. 'work-packet'. Prices the check from the live list.
amountUsdNoCheck against a plain dollar amount instead of a named door.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
toolNo
fundedNo
payUsdNo
workIdNo
claimIdNo
claimableNo
next_callNo
proofRuleNo
fulfillableByNo
definitionOfDoneNo
needs_from_callerNo
notClaimableReasonNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / claimable
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / notClaimableReason
      Added value: +{
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "claimId": {
      +      "type": "string"
      +    },
      +    "definitionOfDone": {
      +      "type": [
      +        "object",
      +        "array",
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "fulfillableBy": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "funded": {
      +      "type": "boolean"
      +    },
      +    "needs_from_caller": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "next_call": {
      +      "type": "object"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "payUsd": {
      +      "type": "number"
      +    },
      +    "proofRule": {
      +      "type": "string"
      +    },
      +    "tool": {
      +      "type": "string"
      +    },
      +    "workId": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds beyond annotations: it specifies that the check 'holds nothing, and charges nothing' and, critically, that an unreadable balance returns UNKNOWN rather than no, preventing false negatives from RPC issues. This is substantial behavioral context not present in annotations.

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?

The description is two sentences, front-loaded with the tool's purpose and result, then the usage guidance and a critical edge-case. Zero filler; every clause earns its place. The UNKNOWN behavior and no-charge note are wrapped into the final sentence without bloat.

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?

Given that the tool has an output schema (so return format is covered elsewhere), three parameters (fully described in schema), and annotations providing the safety profile, the description covers the essential context: what it does, when to use it, the alternative mode, and a critical failure behavior that could otherwise cause wrong agent decisions. No missing information prevents correct calling.

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 coverage is 100%, so all three parameters (wallet, endpoint, amountUsd) are documented in the schema itself. The description adds only marginal semantic value: it clarifies that endpoint is a 'door name' and amountUsd is an alternative ('instead of'), but the schema already states 'A door name from payment_options' and 'Check against a plain dollar amount'. The description does not introduce new details about parameter formats or interactions beyond the schema, so the baseline 3 is appropriate.

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?

The description opens with a precise verb-resource pair: 'Reads a wallet's live USDC balance on Base' and states the core answer it provides (covers a door/amount, exact shortfall, count of calls). It clearly distinguishes itself from payment_submit or prepare tools by being a pre-flight check, and the sibling list contains no other similar preflight tool.

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?

It explicitly instructs to use it 'before a paid call so an agent never burns a turn discovering it is short', giving a strong when-to-use instruction. It does not name specific alternative tools or explicitly say when not to use it, but the 'before a paid call' framing implies the workflow position. The mention of 'or a given amount' also clarifies a second usage mode.

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