get_sale
Retrieve detailed information about a specific consignment sale, including transaction data and item specifics, to track business operations.
Instructions
Get details of a specific sale
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Sale ID |
Implementation Reference
- src/server.ts:114-124 (registration)Registration of the 'get_sale' tool including name, description, and input schema requiring a sale ID.{ name: 'get_sale', description: 'Get details of a specific sale', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Sale ID' }, }, required: ['id'], }, },
- src/server.ts:453-454 (handler)MCP server tool handler that extracts the sale ID from arguments and delegates to client.getSale(), returning the result as JSON text content.case 'get_sale': return { content: [{ type: 'text', text: JSON.stringify(await client.getSale((args as any).id), null, 2) }] };
- src/client.ts:155-158 (helper)Implementation of getSale in the ConsignCloudClient class: performs API GET request to `/sales/${id}` and converts the response data using convertSaleResponse for currency handling.async getSale(id: string): Promise<Sale> { const response = await this.client.get(`/sales/${id}`); return this.convertSaleResponse(response.data); }