get_contracts
Retrieve contract details and coverage periods for a specific customer using their customer ID to manage service agreements.
Instructions
Get all contracts for a specific customer. Returns contract details including coverage periods.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customerId | Yes | The customer ID |
Implementation Reference
- src/index.ts:283-297 (handler)Handler for the 'get_contracts' tool. Validates customerId input, calls the Cisco CX Cloud API endpoint for contract details, and returns the response as formatted JSON text.case "get_contracts": { const customerId = args?.customerId as string; if (!customerId) { throw new Error("customerId is required"); } const data = await makeApiCall("/contracts/contract-details", customerId); return { content: [ { type: "text", text: JSON.stringify(data, null, 2), }, ], }; }
- src/index.ts:122-135 (registration)Registration of the 'get_contracts' tool in the tools list, including name, description, and input schema definition requiring 'customerId'.{ name: "get_contracts", description: "Get all contracts for a specific customer. Returns contract details including coverage periods.", inputSchema: { type: "object", properties: { customerId: { type: "string", description: "The customer ID", }, }, required: ["customerId"], }, },
- src/index.ts:125-134 (schema)Input schema for 'get_contracts' tool, defining the required 'customerId' string parameter.inputSchema: { type: "object", properties: { customerId: { type: "string", description: "The customer ID", }, }, required: ["customerId"], },