get_integration_by_key
Retrieve global integration information by specifying the integration key name. Use to get details for any supported integration like Avalara, BigCommerce, or Shopify.
Instructions
Get global integration info by key name. GET /integrations/{keyName}/get. 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 executes the tool logic. It validates input via Zod schema, then calls integrationService.getIntegrationByKey(client, keyName).
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.getIntegrationByKey(client, parsed.data.keyName) ); } - Zod schema for input validation: keyName must be one of the valid integration key names (enum).
const schema = z.object({ keyName: z.enum(INTEGRATION_KEY_NAMES, { errorMap: () => ({ message: "keyName must be a valid integration key (e.g. xero, shopify, avalara)" }), }), }); - src/tools/integrations/getIntegrationByKey.ts:41-44 (registration)The tool export as a Tool object combining definition and handler. The definition has name 'get_integration_by_key'.
export const getIntegrationByKeyTool: Tool = { definition, handler, }; - src/tools/integrations/index.ts:16-27 (registration)Registration of getIntegrationByKeyTool in the array of all integration tools returned by registerIntegrationTools().
export function registerIntegrationTools(): Tool[] { return [ listIntegrationsTool, getIntegrationConfigTool, getIntegrationByKeyTool, listIntegrationsByKeyTool, listExternalInvoicesTool, listExternalProductsTool, getExternalProductTool, listOrderStatusesTool, ]; } - The underlying API service function that makes the GET /integrations/{keyName}/get HTTP call via the client.
export async function getIntegrationByKey( client: Client, keyName: string ): Promise<unknown> { return client.get<unknown>(`/integrations/${encodeURIComponent(keyName)}/get`); }