Skip to main content
Glama
evidai

pay-per-call-mcp — USDC · x402 · AI Agent Billing | LemonCake

check_balance

Read-onlyIdempotent

Check the current USDC balance, KYC tier, and account info of the configured buyer to confirm sufficient funds before a paid API call.

Instructions

Check the current USDC balance, KYC tier, and account info of the configured buyer.

PRECONDITIONS: • LEMON_CAKE_BUYER_JWT env var must be set. If missing AND no PAY_TOKEN is set, DEMO MODE returns a canned $1.00 demo balance with kycTier="DEMO" so trial users see something instead of an error. With PAY_TOKEN set but no BUYER_JWT, returns a structured CREDENTIAL_MISSING error.

Use BEFORE call_service to confirm sufficient funds, especially before a long batch.

Returns: { balanceUsdc, kycTier, email, name, [mode], [note] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true. Description adds valuable context about demo mode fallback, credential error handling, and return object shape, going beyond what annotations provide.

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?

Description is well-structured with sections for main purpose, preconditions, and usage. It is front-loaded but slightly verbose; each sentence adds value but could be tightened.

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?

Despite no output schema, the description specifies the exact fields returned and conditions. Preconditions, usage guidance, and behavioral quirks are covered, making it complete for a simple read tool.

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?

No parameters exist, so schema coverage is 100%. Description adds meaning by detailing the return object structure and preconditions, which compensates for the lack of parameters.

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?

Clearly states it checks the current USDC balance, KYC tier, and account info. Distinguishes from siblings like call_service and check_tax by being specific about the resource and action.

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?

Explicitly says to use before call_service to confirm sufficient funds, especially before a long batch. Also details preconditions about env vars and demo mode, providing clear when-to and when-not-to guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/evidai/lemon-cake'

If you have feedback or need assistance with the MCP directory API, please join our Discord server