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. Cost and signer: free and keyless, nothing to sign.

Input 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

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.4/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds real behavioral value beyond them: an unreadable balance returns UNKNOWN rather than a false negative, plus free, keyless, nothing to sign, holds nothing. The UNKNOWN failure-mode contract is exactly the kind of nuance annotations cannot express.

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?

Front-loaded with the core action and trigger before the edge-case contract, and every sentence carries information. There is mild redundancy between 'holds nothing, and charges nothing' and 'Cost and signer: free and keyless, nothing to sign', which keeps it from a 5.

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?

For a 3-parameter read-only check with a full output schema, the description covers what it answers, the failure semantics, the cost/signer model, and when to call it. Nothing an agent needs in order to invoke it safely is missing.

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% and each parameter is already described, so the baseline applies. The description echoes the endpoint-or-amount alternative ('one named door (or a given amount)') but adds no new syntax, precedence rule, or behavior when both are supplied, so it does not exceed the schema.

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 and resource — reads a wallet's live USDC balance on Base — plus the exact question it answers (does it cover a named door or amount) and what it returns on failure (shortfall amount). It is clearly distinguishable from sibling tools like payment_options (price list) and my_money (portfolio view) because it is a per-call affordability check.

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?

'Use it before a paid call so an agent never burns a turn discovering it is short' gives a concrete trigger and a cost of skipping it. It stops short of naming the sibling it replaces or stating exclusions (e.g. when to just call my_money instead), so it is clear context but not explicit when/when-not 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