rr_list_purchase_orders
Retrieve purchase orders with filtering options for status, vendor, and search terms to manage inventory procurement.
Instructions
List purchase orders
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | ||
| vendor_id | No | ||
| search | No | ||
| limit | No | ||
| offset | No |
Implementation Reference
- src/index.ts:86-100 (handler)The CallToolRequestSchema handler in src/index.ts dispatches all tool calls, including rr_list_purchase_orders, to a centralized callApi function.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { const result = await callApi(name, (args as Record<string, unknown>) || {}); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } catch (error) { const message = error instanceof Error ? error.message : String(error); return { content: [{ type: 'text', text: `Error: ${message}` }], isError: true, }; } }); - src/index.ts:34-34 (registration)The rr_list_purchase_orders tool is defined within the TOOLS array.
{ name: 'rr_list_purchase_orders', description: 'List purchase orders', inputSchema: { type: 'object' as const, properties: { status: { type: 'string' }, vendor_id: { type: 'string' }, search: { type: 'string' }, limit: { type: 'number' }, offset: { type: 'number' } } } },