get_account
Retrieve account details by ID to manage vendor information and business operations in consignment and retail systems.
Instructions
Get details of a specific account
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Account ID |
Implementation Reference
- src/server.ts:148-158 (schema)Defines the 'get_account' tool schema: name, description, and input schema requiring a string 'id'.{ name: 'get_account', description: 'Get details of a specific account', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Account ID' }, }, required: ['id'], }, },
- src/server.ts:463-464 (handler)MCP tool handler for 'get_account': extracts 'id' from arguments, calls client.getAccount(id), stringifies the result as JSON, and returns it in the tool response format.case 'get_account': return { content: [{ type: 'text', text: JSON.stringify(await client.getAccount((args as any).id), null, 2) }] };
- src/client.ts:203-206 (helper)Core implementation: Makes HTTP GET request to `/accounts/${id}` API endpoint and converts the raw response to typed Account object.async getAccount(id: string): Promise<Account> { const response = await this.client.get(`/accounts/${id}`); return this.convertAccountResponse(response.data); }
- src/client.ts:432-437 (helper)Supporting utility: Converts API account response by adjusting 'balance' from cents (API format) to store currency units.private convertAccountResponse(account: any): Account { return { ...account, balance: this.convertFromApiCents(account.balance), }; }