search_parts
Find automotive parts in Shopmonkey by searching name, part number, or description to manage inventory and complete work orders.
Instructions
Search the parts catalog in Shopmonkey. Use for finding parts by name, number, or description.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query for parts (name, part number, or description) | |
| limit | No | Maximum number of results to return (default: 25) | |
| page | No | Page number for pagination (default: 1) |
Implementation Reference
- src/tools/inventory.ts:87-95 (handler)The search_parts handler implementation that performs a GET request to /part with the provided query parameters.
async search_parts(args) { if (!args.query) return { content: [{ type: 'text', text: 'Error: query is required' }], isError: true }; const params: Record<string, string> = { query: String(args.query) }; if (args.limit !== undefined) params.limit = String(args.limit); if (args.page !== undefined) params.page = String(args.page); const data = await shopmonkeyRequest<InventoryPart[]>('GET', '/part', undefined, params); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }, - src/tools/inventory.ts:37-48 (schema)The input schema definition for the search_parts tool.
name: 'search_parts', description: 'Search the parts catalog in Shopmonkey. Use for finding parts by name, number, or description.', inputSchema: { type: 'object' as const, properties: { query: { type: 'string', description: 'Search query for parts (name, part number, or description)' }, limit: { type: 'number', description: 'Maximum number of results to return (default: 25)' }, page: { type: 'number', description: 'Page number for pagination (default: 1)' }, }, required: ['query'], }, },