Skip to main content
Glama

Get log labels

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cluster_id": "<cluster_id>"
    },
    "name": "get_log_labels"
  }
}

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.3/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, and the description adds real behavioral context beyond that: every result carries cluster_attribution with states 'attributed', 'requested_absent', and 'none', plus an explicit caveat that a shared store's values may include other clusters' namespaces and pods. The trailing 'Read-only.' merely restates the annotation, but the attribution and scoping disclosure is substantive value the structured fields do not provide.

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 and the query_logs trigger are front-loaded, and nearly every clause carries information (backend differences, attribution states, scoping caveat). The cost is density: the first sentence is a long semicolon-chained construct that is harder to parse than it needs to be, and the closing 'Read-only.' duplicates the annotation.

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?

There is no output schema, so the description must explain result shape, and it does so through the cluster_attribution states and the per-backend value semantics. The main residual gap is nothing about volume or limits on label/value lists for large stores, but for a discovery tool with annotations covering safety this is close to complete.

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 all four parameters are already documented in the schema, including the label example and the source fallback semantics. The description does explain the backend-dependent effect of the label parameter, but that largely restates the schema. Baseline 3 is appropriate when the schema carries the parameter burden.

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 and resource ('Discover what is filterable in the cluster's registered log store') and then breaks down what that means per backend: label/field names on Loki and VictoriaLogs versus namespace/pod/container values on Elasticsearch/OpenSearch. This is enough to distinguish it from the many sibling read tools, and especially from query_logs.

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?

It gives an explicit trigger: 'Call this when a query_logs filter returns nothing - the store's label/field names may differ from what you assumed.' That names the alternative tool and the condition that should have routed the agent here, which is exactly the when-to-use guidance the dimension asks for.

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.