Skip to main content
Glama

Search logs

search_logs
Read-only

Search the project's logs, newest first. Logs search language (not SQL): free words are ANDed (whole words), "exact phrase", -word to exclude, service:api, host:web-1, env:prod, source:src_…, level:error or level:>=warn, attr.:value, trace:, pattern:, word* for a prefix. OR is not supported. Returns up to limit lines and a next_cursor for older ones.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd. Default now.
fromNoStart. Default 1h ago. ISO 8601, epoch ms, or relative (15m, 1h, 24h, 7d). Window at most 7 days, within the last 30 days.
limitNoLines to return. Default 50, max 200.
queryNoSearch, e.g. `level:error service:api timeout`. Empty = every line.
cursorNonext_cursor of a previous call, for older lines.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Adds behavior beyond annotations: results are ordered newest-first, capped at `limit`, paginated via `next_cursor`, and explicitly notes OR is not supported — a real quirk worth flagging. Annotations cover read-only and closed-world safety. Doesn't mention rate limits, retention subtleties beyond what's in `from`, or auth requirements, keeping it short of a 5.

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 ordering, then gives a compact, information-dense query-language primer. Every clause is useful; the language reference is long but earns its place as the primary gotcha for callers.

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?

No output schema exists, and the description fills that gap by describing the return shape (up to `limit` lines + next_cursor). Query language semantics are covered. Missing: explicit note of where the logs are scoped (project-level), and potential rate limits or timeouts, but complete enough to call 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 baseline is 3. The description's explanation of the query language (ANDing, -exclusion, field filters, tracing) adds real value beyond the schema's single example, but the other four parameters are only covered by 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+resource: 'Search the project's logs'. The ordering ('newest first') is specified, and the mention of 'logs search language' distinguishes it from SQL-based siblings like run_log_chart or summarize_log_errors.

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?

The description makes clear this is for free-text/log-language search over the project's logs, and differentiates from the structured aggregation siblings by emphasizing the query language. It doesn't explicitly name an alternative tool or state when-not-to-use, so it's clear context without explicit exclusions.

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.