Skip to main content
Glama

balance_history

View balance transaction history to track deposits, purchases, refunds, and other balance changes on the402.ai marketplace.

Instructions

View your balance transaction history on the402.ai. Shows deposits, purchases, refunds, and other balance changes. Requires API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoResults per page (default: 20)
offsetNoPagination offset

Implementation Reference

  • The handler logic for the 'balance_history' tool, which fetches transaction history from the the402.ai API using the client.authGet method.
    server.tool(
    	"balance_history",
    	"View your balance transaction history on the402.ai. Shows deposits, purchases, refunds, and other balance changes. Requires API key.",
    	{
    		limit: z.number().optional().describe("Results per page (default: 20)"),
    		offset: z.number().optional().describe("Pagination offset"),
    	},
    	async ({ limit, offset }) => {
    		const params: Record<string, string> = {};
    		if (limit !== undefined) params.limit = String(limit);
    		if (offset !== undefined) params.offset = String(offset);
    
    		const result = await client.authGet("/v1/balance/history", params);
    		return {
    			content: [
    				{ type: "text" as const, text: JSON.stringify(result, null, 2) },
    			],
    		};
    	}
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool is for viewing history (implying read-only) and mentions an API key requirement, but lacks details on authentication specifics, rate limits, pagination behavior (beyond schema parameters), error handling, or data freshness. For a tool with no annotation coverage, this leaves significant gaps in understanding its operational traits.

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 concise and front-loaded, with two sentences that directly state the purpose and a key requirement. There's no wasted language or redundancy. However, it could be slightly more structured by separating the purpose from prerequisites for better readability, but it remains efficient overall.

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?

Given the tool's moderate complexity (viewing transaction history with pagination), no annotations, no output schema, and 100% schema coverage, the description is minimally adequate. It covers the core purpose and authentication need but lacks details on output format, error cases, or behavioral nuances. For a tool with no output schema, more information on return values would be beneficial, but it meets basic requirements.

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?

The description adds no parameter-specific information beyond what's in the input schema, which has 100% coverage with clear descriptions for 'limit' and 'offset'. The baseline score of 3 is appropriate because the schema adequately documents the parameters, and the description doesn't need to compensate for any gaps. However, it also doesn't enhance understanding of how these parameters affect the transaction history view.

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?

The description clearly states the tool's purpose: 'View your balance transaction history on the402.ai. Shows deposits, purchases, refunds, and other balance changes.' It specifies the verb ('view') and resource ('balance transaction history'), and lists the types of transactions included. However, it doesn't explicitly differentiate from sibling tools like 'check_balance' or 'list_purchases', which might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal usage guidance. It mentions 'Requires API key' as a prerequisite, but offers no explicit advice on when to use this tool versus alternatives like 'check_balance' or 'list_purchases'. There's no context on when this tool is preferred or what scenarios it's designed for, leaving the agent to infer usage from the purpose alone.

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/the402ai/mcp-server'

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