Skip to main content
Glama
AIops-tools

observability-aiops

loki_labels

Read-only

Lists distinct Loki label names for a selected target over a given lookback window, so you can find labels for log queries and filters.

Instructions

[READ] Distinct Loki label names present in the lookback window.

Args: hours: Lookback window in hours (capped at the tool's max lookback). target: Loki target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hoursNo
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the [READ] tag adds little. The description does add one genuine behavioral constraint — the hours window is capped at the tool's max lookback — and notes target defaults to config. No return-shape or volume/rate context beyond that.

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 one line, followed by a compact Args block. No filler sentences; sizing is appropriate for a two-parameter read tool.

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?

For a simple read-only listing tool with no output schema and readOnlyHint already set, the description covers what the tool returns (distinct label names), the window semantics, and target selection. Only the max-lookback value and return format remain unstated, which is minor.

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 carries the burden and does so for both params: hours is the lookback window (with the cap caveat) and target is a config target name that can be omitted for the default. Both parameters gain meaning the bare schema lacks.

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?

The description states a specific verb+resource: 'Distinct Loki label names present in the lookback window.' That clearly separates it from the sibling loki_label_values (which returns values for a label), even though the sibling is never named. Clear, but no explicit sibling differentiation.

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?

Usage is implied rather than stated: the agent can infer this is the tool for enumerating label names in a time window, but there is no 'when to use this vs loki_label_values or loki_query' guidance and no exclusions. Adequate minimum, with a clear gap.

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