Skip to main content
Glama

search_logs

Find log events by text or regex, minimum level, and time window, returning whole stack traces and optional neighboring context so you can diagnose incidents in large logs.

Instructions

Find log events by text/regex, minimum level and time window. A stack trace is ONE event, so a match shows the whole trace. level is a minimum (WARN, ERROR, ...). context adds that many neighbouring events either side. Output is capped at max_matches (max 500) and always states how many more matches exist; newest_first=true keeps the NEWEST matches instead of the oldest. since/until: ISO ('2026-11-06T12:30:00Z', '2026-11-06 12:30') or relative to the newest log entry ('-30m', '-2h'). Naive times use tz.

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": {
      "path": "<path>"
    },
    "name": "search_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
tzNo+00:00
pathYes
levelNo
regexNo
sinceNo
untilNo
contextNo
patternNo
ignore_caseNo
max_matchesNo
newest_firstNo
include_rotatedNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the behavioral burden and discloses important traits: matches are capped at max_matches (max 500), the result states how many additional matches exist, newest_first changes which matches are retained, and stack traces are treated as single events. It does not discuss permission requirements, invalid path behavior, or whether rotated logs are included by default, leaving some operational gaps.

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 description is dense and front-loaded with the core search concept before parameter behavior. It is somewhat run-on but every sentence conveys useful semantics and there is little filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return formatting need not be explained, and the description covers key search behavior and several parameters. For a 12-parameter tool with 0% schema description coverage, however, it omits meaningful semantics for path, include_rotated, ignore_case, and the exact pattern/regex relationship, so an agent cannot fully understand all inputs from this definition alone.

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?

Schema description coverage is 0%, so the description must compensate and it does for many of the 12 parameters: level is a minimum, context adds neighboring events, max_matches caps output at 500, newest_first controls retention order, since/until accept ISO or relative formats like '-30m', and tz applies to naive times. However, it does not explain path, include_rotated, ignore_case, or precisely how pattern and regex interact.

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?

The description clearly states a specific verb and resource: find log events by text/regex, minimum level, and time window. It adds a useful scoping clarification that a stack trace is one event rather than many, but it does not differentiate this search tool from siblings such as tail_logs or log_overview.

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

Usage Guidelines3/5

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

The description implies usage through search criteria and time-window options, but it gives no explicit when-to-use or when-not-to-use guidance relative to alternatives. An agent must infer that this is for filtered historical search rather than tailing or overview from the name and parameter semantics alone.

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