Skip to main content
Glama
adarshba

OpenObserve MCP Server

by adarshba

search_logs

Search log streams across OpenObserve instances using SQL. Automatically selects efficient query strategy based on time range: raw fetch, sampling, or aggregation.

Instructions

Search log streams with SQL across one or more OpenObserve instances. Automatically applies the most efficient query strategy based on time range: raw fetch for ≤1 h, sampling for 1–6 h, hourly aggregation for 6 h–7 d, daily aggregation beyond 7 d. SQL supports =, !=, >, <, >=, <=, IS NULL, IS NOT NULL, AND, OR, NOT, COUNT, SUM, AVG, MIN, MAX, GROUP BY, ORDER BY, histogram(_timestamp). String values use single quotes; stream names use double quotes. match_all('text') performs full-text search across indexed fields with wildcard support (). Do not add WHERE _timestamp filters — time range is handled by startTime and endTime parameters. Examples: SELECT * FROM "mystream" WHERE match_all('error') | SELECT code, COUNT(*) FROM "mystream" GROUP BY code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL query to execute
limitNoResults per instance (applies to raw strategy only)
cursorNoPagination cursor from previous response
endTimeYesEnd time (ISO 8601 or Unix ms)
instancesYesInstance IDs to query
startTimeYesStart time (ISO 8601 or Unix ms)
bypassCacheNoSkip cache lookup
trackTotalHitsNoCompute exact total hit count; slower on large streams
Behavior4/5

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

Covers automatic strategy switching, SQL limitations, and time range handling in detail. No annotations exist, so description carries full burden; does not mention auth or rate limits, but those are less critical for a search tool.

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?

Well-structured with main purpose upfront, followed by detailed strategy rules, SQL syntax, and examples. Slightly verbose due to SQL rule listing, but each section adds value.

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?

Comprehensive for an 8-parameter tool with no output schema. Covers use cases, query strategies, parameter behavior, and pagination. Missing return value specification, but output schema is absent and not required per rules.

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?

Adds significant meaning beyond schema: explains strategy-dependent behavior for startTime/endTime, SQL syntax and capabilities, limit applicability, and performance implications of trackTotalHits. Schema coverage is 100%, but description enhances understanding.

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?

Clearly states the tool searches log streams with SQL across instances, distinguishing from siblings like batch_query (batch processing) and get_logs_around (time-range retrieval) by emphasizing SQL querying and multi-instance support.

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

Usage Guidelines4/5

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

Provides explicit guidance on query strategy selection based on time range, SQL syntax rules, and specific restrictions (e.g., not adding WHERE _timestamp). Does not mention when to use alternatives like batch_query, but the context signals imply alternatives exist.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/adarshba/openobserve-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server