Skip to main content
Glama

port_graph

Read-onlyIdempotent

Render a graph image for a network port, showing traffic or other interface metrics. Uses a fallback if the standard endpoint fails, so you still receive the graph.

Instructions

Render a per-port graph as an image, for example interface traffic.

Some LibreNMS releases fail to render through the per-port endpoint and answer 500 with an empty graph type in the message. For 'bits' this tool then falls back to the port-group endpoint, which renders the same traffic data, so callers still get a graph without needing a port ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNoGraph width in pixels.
heightNoGraph height in pixels.
ifnameYesInterface name as reported by LibreNMS, e.g. 'Po1' or 'Te2/7'
legendNoWhether to render the graph legend.
to_timeNoEnd of the time range, either a relative offset or a Unix timestamp. Defaults to now.
hostnameYesDevice hostname or device ID
from_timeNoStart of the time range, either a relative offset such as '-1d', '-6h' or '-1w', or a Unix timestamp. Defaults to the LibreNMS default (-1d).
graph_typeNoGraph type: 'bits' (traffic), 'upkts' (unicast packets), 'errors', or 'etherlike'bits
Behavior4/5

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

Annotations already declare this as read-only and idempotent. The description adds valuable behavioral context: the fallback mechanism for 'bits' when the per-port endpoint returns a 500, and that it can render graphs 'without needing a port ID'. This goes beyond what annotations alone provide.

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?

The description is three sentences and front-loaded with the core purpose. Each sentence earns its place: the first states the function, the second explains a known failure mode, and the third clarifies the fallback behavior. No filler or redundancy.

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?

Given the tool's complexity (8 params, no output schema), the description covers the core behavior and fallback, and annotations cover safety. It lacks explicit mention of the image return format or response details, but 'graph as an image' is reasonably clear for a graphing tool. The description is complete enough for an agent to understand the tool's operation.

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?

Schema description coverage is 100%, so baseline is 3. The description does not add parameter-specific details, but it hints that hostname and ifname suffice (no port ID needed). The schema already explains each parameter; the description's fallback reference for graph_type 'bits' adds a nuance, but overall the schema carries the burden.

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

Purpose5/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: 'Render a per-port graph as an image, for example interface traffic.' The verb 'render' and resource 'per-port graph' are specific, and the example clarifies the use case. It distinguishes from siblings like 'port_group_graph' by emphasizing 'per-port' and mentioning the fallback to the port-group endpoint only for 'bits'.

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

Usage Guidelines4/5

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

The description provides context on when this tool is useful: it gracefully handles LibreNMS releases that fail on the per-port endpoint by falling back to the port-group endpoint for 'bits'. This explains a key advantage over alternative tools, though it does not explicitly enumerate alternative tools or exclusions.

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/mhajder/librenms-mcp'

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