list_shipping_services
Get a list of available shipping services for your company. Use this to view shipping options in subscription billing.
Instructions
List shipping services. GET /shipping/services. Returns available shipping services for the company.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handler function that executes the list_shipping_services tool logic. It calls shippingService.listShippingServices(client) wrapped in handleToolCall for error handling.
async function handler(client: Client, _args: Record<string, unknown> | undefined) { return handleToolCall(() => shippingService.listShippingServices(client)); - The tool definition/schema for 'list_shipping_services': name, description, and empty inputSchema (no parameters required).
const definition = { name: "list_shipping_services", description: "List shipping services. GET /shipping/services. Returns available shipping services for the company.", inputSchema: { type: "object" as const, properties: {}, required: [], }, }; - src/tools/shipping/index.ts:9-12 (registration)Registration function that returns an array of all shipping tools, including listShippingServicesTool.
/** All 2 shipping tools. */ export function registerShippingTools(): Tool[] { return [listShippingServicesTool, calculateShippingTool]; } - src/tools/shipping/helpers.ts:18-26 (helper)The handleToolCall helper that wraps the actual API call, catches errors, and formats success/error ToolResult responses.
export async function handleToolCall<T>(fn: () => Promise<T>): Promise<ToolResult> { try { const data = await fn(); return successResult(data); } catch (err) { const message = err instanceof Error ? err.message : String(err); return errorResult(`Error: ${message}`); } } - The actual API service function that makes a GET request to /shipping/services using the client.
/** GET /shipping/services */ export async function listShippingServices(client: Client): Promise<unknown> { return client.get<unknown>("/shipping/services"); }