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) },
    			],
    		};
    	}
    );

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