Skip to main content
Glama

Port Graph

port_graph
Read-onlyIdempotent

Generate a per-port graph image from LibreNMS for interface traffic, packets, errors, or etherlike data. When the standard endpoint fails, automatically uses a fallback rendering path so the requested graph is returned.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.11.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already mark the tool readOnly, idempotent, and non-destructive. Beyond that, the description discloses a real behavioral trait: certain LibreNMS releases return 500 on the per-port endpoint, and for 'bits' the tool transparently falls back to the port-group endpoint. This is valuable context that annotations cannot convey.

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?

Three sentences, no filler. The purpose is front-loaded in the first sentence, and the following two sentences earn their place by explaining a non-obvious fallback. It is dense but not bloated.

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 8-parameter read-only graph tool with fully documented schema and no output schema, the description is complete: it states the image output, the scope, and the failure fallback. Nothing required 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.

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds parameter-specific value by explaining the behavior of graph_type='bits' (including fallback to the port-group endpoint), which is more than the schema's type list provides. Other parameters remain documented only by the schema, which is fine.

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 opens with a specific verb-resource pair: 'Render a per-port graph as an image', with 'interface traffic' as an example. It distinguishes from sibling graph tools by explicitly framing this as per-port and mentioning the port-group endpoint as a fallback, so an agent can tell it apart from port_group_graph and device_graph.

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?

It gives clear context for when the tool is appropriate: per-port graphs, with a concrete fallback route when the per-port endpoint fails. It does not explicitly name sibling alternatives or say when not to use it, but the per-port framing and fallback note are enough to guide selection.

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