bos_customer_transactions
Retrieve payment transactions for a customer by providing their customer ID.
Instructions
Get payment transactions for a customer
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customer_id | Yes |
Implementation Reference
- src/tools/bos.ts:331-336 (handler)Handler for the bos_customer_transactions tool - makes a GET request to /mcp/customers/{customer_id}/transactions to retrieve payment transactions for a customer.
{ name: 'bos_customer_transactions', description: 'Get payment transactions for a customer', schema: { customer_id: { type: 'string' } }, handler: async (args, client) => client.get(`/mcp/customers/${args.customer_id}/transactions`), }, - src/tools/bos.ts:332-336 (schema)Input schema for bos_customer_transactions - requires a single 'customer_id' string parameter.
name: 'bos_customer_transactions', description: 'Get payment transactions for a customer', schema: { customer_id: { type: 'string' } }, handler: async (args, client) => client.get(`/mcp/customers/${args.customer_id}/transactions`), }, - src/tools/bos.ts:331-336 (registration)Tool definition for bos_customer_transactions, part of the customerTools array in src/tools/bos.ts.
{ name: 'bos_customer_transactions', description: 'Get payment transactions for a customer', schema: { customer_id: { type: 'string' } }, handler: async (args, client) => client.get(`/mcp/customers/${args.customer_id}/transactions`), }, - src/tools/bos.ts:270-392 (registration)The customerTools array (lines 270-392) that contains the bos_customer_transactions tool definition, exported and then spread into allTools in src/index.ts.
export const customerTools: McpTool[] = [ { name: 'bos_customer_list', description: 'List customers with pagination', schema: { page: { type: 'number', optional: true }, page_size: { type: 'number', optional: true }, search: { type: 'string', optional: true }, }, handler: async (args, client) => client.get('/mcp/customers', args), }, { name: 'bos_customer_show', description: 'Get customer details by ID', schema: { customer_id: { type: 'string' } }, handler: async (args, client) => client.get(`/mcp/customers/${args.customer_id}`), }, { name: 'bos_customer_create', description: 'Create a new customer', schema: { name: { type: 'string' }, phone: { type: 'string' }, email: { type: 'string', optional: true }, address: { type: 'string', optional: true }, }, handler: async (args, client) => client.post('/mcp/customers', args), }, { name: 'bos_customer_update', description: 'Update customer information', schema: { customer_id: { type: 'string' }, name: { type: 'string', optional: true }, phone: { type: 'string', optional: true }, email: { type: 'string', optional: true }, address: { type: 'string', optional: true }, }, handler: async (args, client) => { const { customer_id, ...data } = args; return client.put(`/mcp/customers/${customer_id}`, data); }, }, { name: 'bos_customer_delete', description: 'Delete a customer', schema: { customer_id: { type: 'string' } }, handler: async (args, client) => client.delete(`/mcp/customers/${args.customer_id}`), }, { name: 'bos_customer_search', description: 'Search customers by name, phone or email', schema: { q: { type: 'string' } }, handler: async (args, client) => client.get('/mcp/customers/search', args), }, { name: 'bos_customer_orders', description: 'Get order history for a customer', schema: { customer_id: { type: 'string' } }, handler: async (args, client) => client.get(`/mcp/customers/${args.customer_id}/orders`), }, { name: 'bos_customer_transactions', description: 'Get payment transactions for a customer', schema: { customer_id: { type: 'string' } }, handler: async (args, client) => client.get(`/mcp/customers/${args.customer_id}/transactions`), }, { name: 'bos_customer_address_list', description: 'List all addresses for a customer', schema: { customer_id: { type: 'string' } }, handler: async (args, client) => client.get(`/mcp/customers/${args.customer_id}/addresses`), }, { name: 'bos_customer_address_create', description: 'Add a new address for a customer', schema: { customer_id: { type: 'string' }, address_line_1: { type: 'string' }, city: { type: 'string', optional: true }, state: { type: 'string', optional: true }, country: { type: 'string', optional: true }, zip_code: { type: 'string', optional: true }, }, handler: async (args, client) => { const { customer_id, ...data } = args; return client.post(`/mcp/customers/${customer_id}/addresses`, data); }, }, { name: 'bos_customer_address_update', description: 'Update a customer address', schema: { customer_id: { type: 'string' }, address_id: { type: 'string' }, address_line_1: { type: 'string', optional: true }, city: { type: 'string', optional: true }, state: { type: 'string', optional: true }, }, handler: async (args, client) => { const { customer_id, address_id, ...data } = args; return client.put(`/mcp/customers/${customer_id}/addresses/${address_id}`, data); }, }, { name: 'bos_customer_address_delete', description: 'Delete a customer address', schema: { customer_id: { type: 'string' }, address_id: { type: 'string' } }, handler: async (args, client) => client.delete(`/mcp/customers/${args.customer_id}/addresses/${args.address_id}`), }, { name: 'bos_customer_loyalty_summary', description: 'Get loyalty points summary for a customer', schema: { customer_id: { type: 'string' } }, handler: async (args, client) => client.get(`/mcp/customers/${args.customer_id}/loyalty`), }, { name: 'bos_customer_count', description: 'Get total customer count with optional filters', schema: { status: { type: 'string', optional: true } }, handler: async (args, client) => client.get('/mcp/customers/count', args), }, ]; - src/index.ts:55-76 (registration)Generic registration loop in src/index.ts that registers all tools (including bos_customer_transactions) with the MCP server.
for (const tool of allTools) { const zodSchema = toZodSchema(tool.schema); server.tool( tool.name, tool.description, zodSchema.shape, async (args: any) => { try { const result = await tool.handler(args, client); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], }; } catch (error: any) { return { content: [{ type: 'text' as const, text: JSON.stringify({ error: error.message || 'Unknown error' }) }], isError: true, }; } } ); }