Skip to main content
Glama

Port Graph

port_graph
Read-onlyIdempotent

Render a LibreNMS interface graph as an image for traffic, packets, errors, or etherlike metrics; falls back to port-ID rendering when slash-encoded interface names fail.

Instructions

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

Names like 'Te2/7' can fail by name behind proxies that reject or decode the encoded slash. For 'bits' this tool then falls back to the port-group endpoint, which renders the same traffic data by port ID, so callers still get a graph.

Input 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), 'nupkts' (non-unicast packets), 'errors', or 'etherlike'. The LibreNMS names ('port_bits', ...) are accepted too.bits

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.12.0
    • changedInput schema / properties / graph_type / description
      Previous value: -"Graph type: 'bits' (traffic), 'upkts' (unicast packets), 'errors', or 'etherlike'"New value: +"Graph type: 'bits' (traffic), 'upkts' (unicast packets), 'nupkts' (non-unicast packets), 'errors', or 'etherlike'. The LibreNMS names ('port_bits', ...) are accepted too."
  2. Addedv1.11.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false, so the safety profile is covered. The description adds behavior those annotations cannot: an internal fallback path on name-resolution failure that is limited to graph_type 'bits', implying other types may hard-fail. That is meaningful operational context.

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?

Purpose is front-loaded in the first sentence, with the edge-case note quarantined to a second paragraph. Both paragraphs earn their place, though the fallback explanation is slightly verbose for what it conveys.

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

Completeness5/5

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

For an image-rendering read tool with full annotation coverage and a 100%-documented schema, the description supplies the one thing structured fields can't: the name-resolution failure mode and the conditional automatic fallback. Nothing needed to call it correctly is missing.

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 the baseline is 3. The description does add value beyond the schema by tying ifname name-format fragility and the graph_type 'bits' fallback together, but it adds no syntax or format detail for width/height/legend/from_time/to_time that the schema doesn't already carry.

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?

Specific verb+resource: 'Render a per-port graph as an image', with the example 'interface traffic' pinning down the resource. The 'per-port' scope implicitly separates it from sibling graph tools like device_graph and port_group_graph, though it never names them explicitly.

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?

The second paragraph gives real operating guidance: name-form ifnames such as 'Te2/7' can fail behind slash-rejecting proxies, and for 'bits' the tool transparently falls back to the port-group endpoint. However, it never states when to pick this over device_graph or port_group_graph, or what to do for non-'bits' types when the name fails.

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