Skip to main content
Glama
Theoddalex

imprest

by Theoddalex

request_approval

Request approval for an exact token allowance, capped by per-asset limits. Revoke an existing allowance by setting amount to zero.

Instructions

Grant a token spender an allowance so a contract (a marketplace, subscription, or swap) can later pull funds. The policy decides whether it is allowed, blocked, or needs human approval.

imprest approves an EXACT amount only — never an unlimited allowance, the vector behind most token drains. The allowance is capped by, and counts against, the same per-asset limits as a direct payment, and the TOTAL of live allowances across all spenders is itself capped (an allowance outlives budget windows, so it is tracked as a standing liability). Approving 0 revokes the spender's allowance and frees cap.

Args: spender: the 0x address being granted the allowance amount: the allowance, in whole units of asset (e.g. 25 for 25 USDC); 0 revokes this spender's existing allowance asset: the token symbol (e.g. "USDC"); native ETH cannot be approved reason: what the approval is for (recorded in the audit log)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetYes
amountYes
reasonNo
spenderYes
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: exact amount only, cap limits, standing liability tracking, revocation via 0, and that native ETH cannot be approved. It provides thorough details on how the allowance is managed and its lifecycle.

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 description is well-structured with a concise overview followed by bullet-pointed args. It is front-loaded with the main action. The 'imprest' paragraph adds valuable context but is slightly verbose; overall efficient.

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

Completeness3/5

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

The description covers inputs and behavior comprehensively but does not mention the return value or outcome (e.g., success status, transaction hash). Given moderate complexity and no output schema, this omission reduces completeness for an agent using the tool.

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

Parameters5/5

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

Schema coverage is 0%, but the description fully explains all 4 parameters: spender (address), amount (whole units, 0 revokes), asset (token symbol, no ETH), and reason (audit log). This compensates entirely for the missing schema descriptions.

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 clearly states the action: 'Grant a token spender an allowance' with a specific verb and resource. It distinguishes from sibling tools by focusing on approvals rather than direct payments, and provides concrete examples of use cases like marketplaces or subscriptions.

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?

The description explains when to use this tool (to grant an allowance) and when to revoke (amount=0). It mentions the policy decision and exact amount limitation, but does not explicitly compare to alternatives like request_payment. Context is clear but lacks explicit exclusions.

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/Theoddalex/agentpay'

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