Skip to main content
Glama

error_counters

Read-only

Read per-service request and status-code counters from Traefik or HAProxy to analyze error rates and support root-cause analysis.

Instructions

[READ] Per-service request/status-code counters (feeds error_rate_rca).

traefik: parsed from the /metrics text endpoint (per-code); haproxy: Data Plane stats (per-class hrsp_*); caddy: teaching note (no per-route counters).

Args: target: Proxy target name from config; omit for the default.

Returns an envelope: {"services": [...], "returned": N, "limit": L, "truncated": bool, "total": T}. When "truncated" is true this proxy serves more services than were returned (only the busiest services are returned).

Input Schema

NameRequiredDescriptionDefault
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses substantial behavioral detail: per-backend parsing semantics (traefik per-code, haproxy per-class, caddy has no per-route counters) and, critically, the truncation behavior — only the busiest services are returned when truncated is true. This tells an agent exactly what data it may and may not get back.

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?

Front-loaded with the [READ] marker and a one-line purpose, followed by structured Args and Returns sections. Every block carries real information, though the dense per-backend parsing breakdown adds some length for a single-parameter tool.

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?

Even without an output schema, the description supplies the return envelope shape (services, returned, limit, truncated, total) and the meaning of truncation, plus proxy-specific data caveats. An agent has everything needed to call it and interpret the result.

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 description coverage is 0%, so the description must compensate, and it does: it explains that target is a 'Proxy target name from config' and that omitting it selects the default. The one gap is that it doesn't say whether the config name matches route/service naming elsewhere.

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 states a specific verb+resource: per-service request/status-code counters, and marks it as a read tool. It distinguishes itself from siblings by noting it feeds error_rate_rca and by breaking down exactly how each proxy backend (traefik, haproxy, caddy) is parsed.

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?

Naming error_rate_rca as the consumer implies the tool's role as a raw data source, which is useful context, but the description never states explicitly when to use this tool versus alternatives like traffic_stats or error_rate_rca itself. Usage is implied rather than spelled out.

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