Skip to main content
Glama

get_log_labels

Read-only

Discover what is filterable in the cluster's registered log store before querying: on Loki and VictoriaLogs the label or field names (or one's values via the label parameter, e.g. label='namespace'); on Elasticsearch/OpenSearch the namespace/pod/container values seen in the window. Call this when a query_logs filter returns nothing - the store's label/field names may differ from what you assumed. Every result carries cluster_attribution with the same states as query_logs: on a store that attributes lines to clusters the values are scoped to this cluster (state "attributed", or "requested_absent" when nothing in the window carries this cluster's value); with state "none" the values are not scoped and, if the store is shared by several clusters, may include other clusters' namespaces and pods - say so. Read-only.

Input Schema

NameRequiredDescriptionDefault
labelNoLoki and VictoriaLogs: return this label's (field's) values instead of the name list (e.g. 'namespace', 'kubernetes.pod_name').
sinceNoLook-back window, e.g. '1h', '24h' (default 1h).
sourceNoauto (default): connected, then hosted if absent. Explicit choices never fall back; match queries and labels.
cluster_idYesAnkra cluster id (UUID) the call targets. Discover ids with list_clusters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / source
      Added value: +{
      +  "description": "auto (default): connected, then hosted if absent. Explicit choices never fall back; match queries and labels.",
      +  "enum": [
      +    "auto",
      +    "connected",
      +    "ankra_hosted"
      +  ],
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only supply readOnlyHint, and the description adds substantial context beyond it: the cluster_attribution states (attributed, requested_absent, none), how values are scoped to the cluster, and the caveat that an unscoped shared store may leak other clusters' namespace/pod names. This is rich behavioral disclosure an agent needs for correct interpretation.

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-loads the purpose and the when-to-use trigger before the attribution detail. It is dense and somewhat run-on, and the trailing 'Read-only' duplicates the readOnlyHint annotation, but nearly every clause carries operational value.

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?

With no output schema, the description still explains what is returned (label/field names or values) and the cluster_attribution envelope and its states. An agent has everything needed to invoke it and interpret results correctly.

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 schema already documents all four parameters, setting the baseline at 3. The description reinforces the label parameter's value-retrieval semantics (e.g. label='namespace') but adds no meaning for since/source/cluster_id beyond the schema.

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?

States a specific verb and resource — discover filterable label/field names in the cluster's registered log store — and differentiates behavior per backend (Loki/VictoriaLogs label names vs Elasticsearch/OpenSearch namespace/pod/container values). An agent can distinguish it from query_logs without opening the schema.

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

Usage Guidelines5/5

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

Explicitly names the triggering condition ('call this when a query_logs filter returns nothing') and the reason ('the store's label/field names may differ from what you assumed'), positioning it relative to the query_logs sibling. The label-parameter path for retrieving values is also called out.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources