Skip to main content
Glama

pt_read_cdp

Read the live CDP neighbour table to see which device is cabled to which port, including platform and capabilities; filter by device name to verify topology.

Instructions

Reads the REAL CDP neighbour table: who is cabled to which port.

Per neighbour: device id, local and remote port, platform, capability. CDP announces every 60 s: right after a deploy the table is empty.

Parameters:

  • device: device name; empty = every device.

Example: pt_read_cdp(device="SW1")

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pt_read_cdp"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden, and it does disclose that the read targets REAL device state rather than a simulated model plus the CDP advertisement interval that governs freshness. It omits failure modes (unreachable device, CDP disabled) but the read-only nature is unambiguous from the verb and the freshness behavior is the non-obvious trait an agent needs.

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

Conciseness5/5

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

Front-loaded with the core purpose, then per-neighbour field list, then a labeled Parameters block and a concrete example. Every line earns its place; nothing is repeated from the schema or padded.

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

Completeness4/5

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

An output schema exists, so return values need no explanation, and the description still lists the per-neighbour fields (device id, local/remote port, platform, capability) so the agent knows what it gets. For a single-parameter read tool this is nearly complete; only error/empty-result handling beyond the deploy caveat is unaddressed.

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

Parameters5/5

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

Schema description coverage is 0%, yet the description fully compensates: "device: device name; empty = every device" explains both the meaning and the semantics of the default empty string. The worked example pt_read_cdp(device="SW1") removes any ambiguity about the expected value format.

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?

States a specific verb and resource: "Reads the REAL CDP neighbour table: who is cabled to which port." That framing (layer-2 adjacency) distinguishes it from table readers like pt_read_mac_table or pt_read_arp implicitly, but no sibling is named explicitly, so differentiation is inferential rather than stated.

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

Usage Guidelines3/5

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

Gives a genuinely useful timing caveat — CDP announces every 60 s, so the table is empty right after a deploy — which effectively says when NOT to trust the result. However, there is no explicit guidance on when to prefer this over other topology-adjacency sources, and the empty-default-to-all-devices behavior is only covered under parameters.

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

Deploy Server

Other Tools