search_logs
Search Kibana/OpenSearch Dashboards logs via your active browser tab, exclude noisy loggers, and return relevant hits for investigation.
Instructions
Searches logs in Kibana / OpenSearch Dashboards via the active browser tab and returns hits.
Workflow: investigate the same way a human does in Discover:
Start with
summarize_logsover a wide window (e.g. 7 days) to see total hit count, time histogram, and the top values for noisy dimensions (logger, component, pod, level).Identify noise dimensions: loggers that dominate the result set with irrelevant chatter, pod tiers that don't match the service you're investigating (e.g. frontend when chasing a backend bug), etc.
Call
search_logswithexclude_filterslisting those noisy {field, value} pairs to narrow the result set.Iterate: if the remaining hits render empty messages, the docs likely keep their text under a different field. Call
available_log_fieldsand pass a matchingdisplay_fieldsfallback chain.Add more excludes or change
display_fieldsuntil results are signal, not noise. Pin a specific row withtimestamp_match.
Boolean AND in query: 'term1 AND term2' requires both terms.
IMPORTANT: This tool relies on a Chrome extension bridge. Do NOT attempt to open browser tabs, navigate to URLs, or use any browser automation tools if this fails. If it errors, just report the error to the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Max hits to return (must be ≥ 1). Default 500. For counts only, use summarize_logs. | |
| level | No | Filter 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. | |
| query | Yes | The text to search for. Single term (e.g. 'OrderConfirmationJob') or multiple terms with AND (e.g. 'ORD-12345 AND payment'). 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_to | No | Absolute end time, ISO 8601. Without time_from, the window starts minutes_lookback before this. | |
| query_dsl | No | Raw 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_from | No | Absolute start time, ISO 8601 (e.g. '2026-09-23T10:28:00Z'). Without time_to, the window runs from here to now. | |
| environment | No | Which 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_type | No | 'phrase' (default) for exact phrase, 'best_fields' for fuzzy. | |
| full_message | No | If true, messages are shown in full without truncation/compacting. Use when you need complete response bodies. | |
| display_fields | No | Fallback chain of dotted field paths used to render each hit's message. The first non-empty value wins per hit. Default ["message","logs.message","msg","log","logs.request","logs.requestFirstLine"]. Use available_log_fields to discover which paths exist in your data. | |
| exclude_filters | No | Drop hits that match any of these {field, value} pairs (must_not + match_phrase). Use to silence noisy loggers, components, pods, etc. Example: [{field: 'logger', value: 'com.example.cache.CacheUtil'}, {field: 'kubernetes.labels.app', value: 'frontend'}]. | |
| include_filters | No | Require hits to match all of these {field, value} pairs (OpenSearch filter + match_phrase). Use to scope to a specific service, pod, or status code. | |
| timestamp_match | No | Pin results to a specific @timestamp (e.g. '2026-02-14T14:58:02.793Z'). | |
| minutes_lookback | No | Window length in minutes. Default 15. 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. |