Skip to main content
Glama

QuickBooks Online MCP Server

by heyibad
get-customer.tool.ts1.52 kB
import { getQuickbooksCustomer } from "../handlers/get-quickbooks-customer.handler.js"; import { ToolDefinition } from "../types/tool-definition.js"; import { z } from "zod"; const toolName = "get_customer"; const toolTitle = "Get Customer"; const toolDescription = "Get a customer by Id from QuickBooks Online."; const inputSchema = { id: z.string().describe("The ID of the customer to retrieve"), }; const outputSchema = { success: z.boolean().describe("Whether the operation was successful"), customer: z.any().optional().describe("The customer object"), error: z.string().optional().describe("Error message if operation failed"), }; const toolHandler = async ( params: z.infer<z.ZodObject<typeof inputSchema>> ) => { const response = await getQuickbooksCustomer(params.id); if (response.isError) { return { content: [ { type: "text" as const, text: `Error getting customer: ${response.error}`, }, ], }; } return { content: [ { type: "text" as const, text: `Customer:` }, { type: "text" as const, text: JSON.stringify(response.result) }, ], }; }; export const GetCustomerTool: ToolDefinition< typeof inputSchema, typeof outputSchema > = { name: toolName, title: toolTitle, description: toolDescription, inputSchema: inputSchema, outputSchema: outputSchema, handler: toolHandler, };

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/heyibad/quickbook-mcp-'

If you have feedback or need assistance with the MCP directory API, please join our Discord server