Skip to main content
Glama

search_logs

Read-onlyIdempotent

Search an incident's logs by ID, query terms, level, and service for paginated, timestamp-ordered results with match totals. Use it to find relevant records; zero matches is not an error.

Instructions

Search one incident's logs. Read-only and paginated, in timestamp order.

    No match is not an error: it returns total_matches 0. Each record carries its LOG- ID.
    

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

Input Schema

NameRequiredDescriptionDefault
levelNoMinimum level: WARN also returns ERROR and FATAL.
limitNo
queryNoSpace-separated terms; all must appear (case-insensitive) in a record's message, service, level or attributes. Empty matches every record.
offsetNoPass next_offset to get the next page.
serviceNoExact service name.
incident_idYese.g. INC-0001

Output Schema

NameRequiredDescriptionDefault
offsetYes
recordsYes
returnedYes
incident_idYes
next_offsetYes
total_matchesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, closed-world behavior. The description adds useful behavioral detail beyond that: results are paginated in timestamp order, empty results return total_matches 0 rather than an error, and each record carries a LOG- ID.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the tool's purpose, followed by key behavioral constraints. The structure is efficient and every sentence carries useful information, with only minor redundancy in restating read-only.

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?

Given the rich input schema, existing output schema, and annotations, the description covers scope, ordering, pagination, and empty-result semantics adequately. The main gap is explicit selection guidance versus alternatives, which is already reflected in the usage score.

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 high at 83%, and the schema already explains level filtering, query token matching, service filtering, limit, offset, and incident ID format. The description only implies incident scoping and pagination, adding little parameter meaning beyond 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?

The description states a specific verb, resource, and scope: 'Search one incident's logs.' This clearly distinguishes the tool from siblings that retrieve runbooks or tickets, even without naming them.

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?

Usage is implied by the phrase 'Search one incident's logs,' but the description gives no explicit when-to-use, when-not-to-use, or alternative-tool guidance. Sibling tools are different resources, but the description does not help the agent choose between them.

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

Deploy Server

Other Tools