get_uncovered_assets
Identify assets without active contracts for a customer to reveal coverage gaps in Cisco CX Cloud infrastructure.
Instructions
Get all assets NOT covered by contracts for a specific customer. Useful for identifying coverage gaps.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customerId | Yes | The customer ID |
Implementation Reference
- src/index.ts:315-329 (handler)Handler for get_uncovered_assets tool: validates customerId input, makes authenticated API call to /contracts/not-covered endpoint, and returns the response as formatted JSON.case "get_uncovered_assets": { const customerId = args?.customerId as string; if (!customerId) { throw new Error("customerId is required"); } const data = await makeApiCall("/contracts/not-covered", customerId); return { content: [ { type: "text", text: JSON.stringify(data, null, 2), }, ], }; }
- src/index.ts:153-162 (schema)Input schema definition for the get_uncovered_assets tool, specifying customerId as a required string parameter.inputSchema: { type: "object", properties: { customerId: { type: "string", description: "The customer ID", }, }, required: ["customerId"], },
- src/index.ts:150-163 (registration)Tool registration in the tools array, defining name, description, and input schema for listTools response.{ name: "get_uncovered_assets", description: "Get all assets NOT covered by contracts for a specific customer. Useful for identifying coverage gaps.", inputSchema: { type: "object", properties: { customerId: { type: "string", description: "The customer ID", }, }, required: ["customerId"], }, },
- src/index.ts:34-70 (helper)Shared helper function used by get_uncovered_assets (and other tools) to perform authenticated GET requests to Cisco CX Cloud API endpoints.async function makeApiCall(endpoint: string, customerId?: string): Promise<any> { const token = await authClient.getAccessToken(); let url = `${CX_CLOUD_BASE_URL}${endpoint}`; if (customerId) { url += `${endpoint.includes('?') ? '&' : '?'}customerId=${customerId}`; } logger.debug(`Making API call to: ${url}`); try { logger.apiRequest('GET', url, { Authorization: 'Bearer ***', }); const startTime = Date.now(); const response = await axios.get(url, { headers: { Authorization: `Bearer ${token}`, }, }); const duration = Date.now() - startTime; logger.apiResponse('GET', url, response.status, response.data); logger.debug(`API call completed in ${duration}ms`); return response.data; } catch (error) { logger.apiError('GET', url, error); if (axios.isAxiosError(error)) { throw new Error( `API call failed: ${error.response?.status} - ${error.response?.data?.message || error.message}` ); } throw error; } }