list_integrations_by_key
Retrieve a list of company integrations filtered by a specific integration key name, such as avalara, shopify, or xero.
Instructions
List company integrations by key name. GET /integrations/{keyName}/list. keyName: avalara, bigcommerce, customRate, fedex, flatRate, freeShipping, freshBooksCloudAccounting, google, mailchimp, monsoonStoneEdge, myob, pickupInStore, quickbooks, saasu, salesforce, shipBy, shipperHq, shippingZone, shopify, slack, smtp, taxamo, thomsonreuters, ups, upsShippingProtection, usps, vertex, xero.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyName | Yes | Integration key name (required). One of: avalara, bigcommerce, customRate, fedex, flatRate, freeShipping, freshBooksCloudAccounting, google, mailchimp, monsoonStoneEdge, myob, pickupInStore, quickbooks, saasu, salesforce, shipBy, shipperHq, shippingZone, shopify, slack, smtp, taxamo, thomsonreuters, ups, upsShippingProtection, usps, vertex, xero |
Implementation Reference
- The handler function that validates args via Zod schema and calls integrationService.listIntegrationsByKey.
async function handler(client: Client, args: Record<string, unknown> | undefined) { const parsed = schema.safeParse(args); if (!parsed.success) { return errorResult(parsed.error.errors.map((e) => e.message).join("; ")); } return handleToolCall(() => integrationService.listIntegrationsByKey(client, parsed.data.keyName) ); } export const listIntegrationsByKeyTool: Tool = { definition, handler, }; - Zod schema for input validation: keyName must be one of the INTEGRATION_KEY_NAMES enum values.
const schema = z.object({ keyName: z.enum(INTEGRATION_KEY_NAMES, { errorMap: () => ({ message: "keyName must be a valid integration key" }), }), }); - src/tools/integrations/index.ts:16-27 (registration)registerIntegrationTools() includes listIntegrationsByKeyTool in the array returned to the central tool registry.
export function registerIntegrationTools(): Tool[] { return [ listIntegrationsTool, getIntegrationConfigTool, getIntegrationByKeyTool, listIntegrationsByKeyTool, listExternalInvoicesTool, listExternalProductsTool, getExternalProductTool, listOrderStatusesTool, ]; } - The service function that makes the actual HTTP GET /integrations/{keyName}/list API call.
/** GET /integrations/{keyName}/list – list company integrations by key name. */ export async function listIntegrationsByKey( client: Client, keyName: string ): Promise<unknown> { return client.get<unknown>(`/integrations/${encodeURIComponent(keyName)}/list`); } - INTEGRATION_KEY_NAMES constant defining the valid enum values for the keyName parameter.
export const INTEGRATION_KEY_NAMES = [ "avalara", "bigcommerce", "customRate", "fedex", "flatRate", "freeShipping", "freshBooksCloudAccounting", "google", "mailchimp", "monsoonStoneEdge", "myob", "pickupInStore", "quickbooks", "saasu", "salesforce", "shipBy", "shipperHq", "shippingZone", "shopify", "slack", "smtp", "taxamo", "thomsonreuters", "ups", "upsShippingProtection", "usps", "vertex", "xero", ] as const;