Skip to main content
Glama
yunusemregul

Kibana Bridge MCP

by yunusemregul

available_log_fields

Discover which log fields exist in your data by sampling matching documents, so you know which paths are valid to aggregate, display, or filter before investigating.

Instructions

Returns every populated field path (dotted) found in a sample of matching log docs, annotated with each field's type and aggregatability from the dashboard's field-caps API when available. Call this ONCE at the start of a fresh investigation to learn the schema: what aggregate_fields and display_fields paths are valid in this data. The tool samples hits stratified across kubernetes.container_name values (FIELDS_STRATIFY_FIELD env) so rare container types still contribute their fields, walks each doc's _source, and returns a deduplicated list grouped to keep kubernetes.annotations.* collapsed.

Use the result to decide which fields to summarize, exclude, include, or display. Subsequent investigation turns rarely need to re-call this because the schema is stable across queries.

Tip: pair it on the very first turn with a summarize_logs call (in parallel) so you get distributions and schema in one shot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoFilter on the level field (LEVEL_FIELD env, default logs.level; currently `logs.level`), e.g. 'ERROR' or ['ERROR','WARN']. Prefer this over putting ERROR in query, which also matches INFO messages containing the word error.
queryYesSame as search_logs: picks docs to sample. An empty string or '*' matches all documents. The text is matched against these fields: message, logs.message, msg, log, logs.loggerName, logs.thread, logs.thrown.name, logs.thrown.message, logs.request, logs.requestFirstLine (override with the QUERY_FIELDS env var).
time_toNoAbsolute end time, ISO 8601. Without time_from, the window starts minutes_lookback before this.
query_dslNoRaw OpenSearch/Elasticsearch query DSL clause, AND-ed into the bool filter alongside `query` and the time range. Use for anything the plain text query can't express: numeric ranges ({range: {status: {gte: 500}}}), wildcards ({wildcard: {'url.keyword': '/api/*'}}), OR logic ({bool: {should: [...], minimum_should_match: 1}}), exists checks, etc.
time_fromNoAbsolute start time, ISO 8601 (e.g. '2026-09-23T10:28:00Z'). Without time_to, the window runs from here to now.
environmentNoWhich dashboard environment to search, as configured in the extension popup. The extension has not reported any environments yet, so omit this unless the user names one.
search_typeNo
exclude_filtersNo
include_filtersNo
minutes_lookbackNoWindow length in minutes. Default 60. With neither time_from nor time_to it means the last N minutes up to now; with only time_to it means the N minutes ending at time_to; ignored when time_from is given. The response header always shows the resolved absolute UTC window.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and discharges it: it discloses the sampling strategy (stratified across `kubernetes.container_name` via FIELDS_STRATIFY_FIELD so rare container types contribute), the extraction method (walks each doc's `_source`), deduplication, and result grouping that collapses `kubernetes.annotations.*`. It also notes enrichment from the field-caps API when available. These details materially affect how the agent should interpret the returned field list.

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?

The purpose is front-loaded in the first sentence, followed by usage guidance and a closing tip; every paragraph carries information. The one redundancy is restating the 'call once / rarely re-call' point in two separate sentences, which costs a little tightness.

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 10-parameter, no-output-schema tool, the description covers the essentials: what is returned (deduplicated, type-annotated, aggregatability-annotated field paths), how it is shaped (grouped/collapsed), and when to invoke it. It does not describe response envelope details or any bound on the sampled document count, which is a minor gap given there is no output schema to fall back on.

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 70% and the schema already documents each parameter in detail (level, query, query_dsl, include/exclude_filters, time windows). The description only gestures at parameter behavior ('found in a sample of matching log docs', the stratify env var) without adding syntax or semantics beyond what the schema states, so the baseline of 3 applies.

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 gives a precise verb and resource: 'Returns every populated field path (dotted) found in a sample of matching log docs,' plus the schema-discovery intent ('learn the schema: what `aggregate_fields` and `display_fields` paths are valid'). This is unmistakably distinct from the sibling search/inspect/summarize tools, which operate on log content rather than on the field inventory.

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 states when to call it ('Call this ONCE at the start of a fresh investigation'), when not to ('Subsequent investigation turns rarely need to re-call this because the schema is stable across queries'), and how to pair it ('pair it on the very first turn with a `summarize_logs` call (in parallel)'). This is a textbook when/when-not/alternative instruction.

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