Skip to main content
Glama
ogbm77

Cisco CX Cloud MCP Server

by ogbm77

get_network_elements

Retrieve network device inventory and details for a specific customer to manage hardware assets and monitor network infrastructure.

Instructions

Get network elements inventory for a specific customer. Returns network devices and their details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customerIdYesThe customer ID

Implementation Reference

  • The handler function for the 'get_network_elements' tool. It extracts the customerId from arguments, validates it, calls the API endpoint '/inventory/network-elements' using makeApiCall, and returns the JSON response as text content.
    case "get_network_elements": {
      const customerId = args?.customerId as string;
      if (!customerId) {
        throw new Error("customerId is required");
      }
      const data = await makeApiCall("/inventory/network-elements", customerId);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
  • The tool definition including name, description, and input schema for 'get_network_elements'. Specifies that customerId is a required string input.
    {
      name: "get_network_elements",
      description: "Get network elements inventory for a specific customer. Returns network devices and their details.",
      inputSchema: {
        type: "object",
        properties: {
          customerId: {
            type: "string",
            description: "The customer ID",
          },
        },
        required: ["customerId"],
      },
  • src/index.ts:223-228 (registration)
    Registration of all tools via the ListToolsRequestSchema handler, which returns the tools array containing 'get_network_elements'.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      logger.debug('ListTools request received');
      return {
        tools,
      };
    });
  • Shared helper function makeApiCall used by the get_network_elements handler to make authenticated GET requests to the Cisco CX Cloud API.
    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;
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns 'network devices and their details,' which implies a read-only operation, but does not cover aspects like authentication requirements, rate limits, error handling, or pagination. For a tool with no annotations, this leaves significant gaps in behavioral understanding.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, consisting of two sentences that directly state the tool's purpose and return value. There is no wasted language, and it efficiently communicates the core functionality. However, it could be slightly improved with more structured guidance, preventing a perfect score.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (simple parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and return value but lacks details on behavioral traits, usage context, and output structure. This makes it complete enough for a basic read operation but with clear gaps that hinder full understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the parameter 'customerId' documented as 'The customer ID.' The description adds no additional semantic information beyond what the schema provides, such as format examples or constraints. According to the rules, when schema coverage is high (>80%), the baseline score is 3, which applies here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get network elements inventory for a specific customer.' It specifies the verb ('Get'), resource ('network elements inventory'), and scope ('for a specific customer'), which is clear and specific. However, it does not explicitly distinguish this tool from its siblings (e.g., get_hardware_inventory), which prevents a score of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions 'for a specific customer,' but does not clarify prerequisites, exclusions, or when to choose this over sibling tools like get_hardware_inventory or get_covered_assets. This lack of explicit usage context results in a minimal score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ogbm77/cisco-cx-cloud-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server