Skip to main content
Glama

Xero MCP Server

Official
MIT License
293
128
  • Apple
  • Linux
create-tracking-options.tool.ts1.22 kB
import { z } from "zod"; import { CreateXeroTool } from "../../helpers/create-xero-tool.js"; import { formatTrackingOption } from "../../helpers/format-tracking-option.js"; import { createXeroTrackingOptions } from "../../handlers/create-xero-tracking-option.handler.js"; const CreateTrackingOptionsTool = CreateXeroTool( "create-tracking-options", `Create tracking options for a tracking category in Xero.`, { trackingCategoryId: z.string(), optionNames: z.array(z.string()).max(10) }, async ({ trackingCategoryId, optionNames }) => { const response = await createXeroTrackingOptions(trackingCategoryId, optionNames); if (response.isError) { return { content: [ { type: "text" as const, text: `Error while creating tracking options: ${response.error}` } ] }; } const trackingOptions = response.result; return { content: [ { type: "text" as const, text: `${trackingOptions.length || 0} out of ${optionNames.length} tracking options created:\n${trackingOptions.map(formatTrackingOption)}` }, ] }; } ); export default CreateTrackingOptionsTool;

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/XeroAPI/xero-mcp-server'

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