get_account_stats
Retrieve account statistics including balance, items, and sales data for consignment business management and analytics.
Instructions
Get statistics for a specific account (balance, items, sales)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Account ID |
Implementation Reference
- src/server.ts:194-204 (registration)Tool registration including name, description, and input schema (requires 'id' parameter). Used by MCP server for listing available tools.{ name: 'get_account_stats', description: 'Get statistics for a specific account (balance, items, sales)', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Account ID' }, }, required: ['id'], }, },
- src/server.ts:473-474 (handler)MCP server dispatch handler for 'get_account_stats': extracts 'id' argument and delegates to client.getAccountStats(), formats result as JSON text content.case 'get_account_stats': return { content: [{ type: 'text', text: JSON.stringify(await client.getAccountStats((args as any).id), null, 2) }] };
- src/client.ts:232-235 (handler)Primary tool implementation: performs HTTP GET to ConsignCloud API endpoint `/accounts/${id}/stats` and returns the raw stats data.async getAccountStats(id: string): Promise<any> { const response = await this.client.get(`/accounts/${id}/stats`); return response.data; }