Skip to main content
Glama

Search log lines

search_logs
Read-only

Application log lines from the backend SDK, newest first, or counts with group_by. Use it to see what happened around an error: pass trace_id for one request's lines, or q and level to search. Lines are kept 14 days, and the default range is the last 24 hours.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoText in the message, any case
toNoAn ISO time, or how long ago
fromNoAn ISO time, or 30m, 24h, 7d
levelNotrace, debug, info, warning, error or fatal; commas for several
limitNoLines (default 50)
routeNo
cursorNonext_cursor from the last answer
loggerNo
releaseNo
user_idNo
group_byNoCounts per value instead of lines
trace_idNoOne trace's lines, however old
environmentNo
message_charsNoCharacters of each message (default 500)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare this a safe read (readOnlyHint true, destructiveHint false, openWorld false), and the description adds genuinely new behavior: newest-first ordering, 14-day retention, a default window of the last 24 hours, and the group_by counts mode. It omits pagination behavior and result-size expectations, so it is strong but not exhaustive.

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?

Three short sentences with no filler, and the resource plus primary output mode is front-loaded. The retention/default-range sentence is slightly tacked on rather than integrated with the trace_id carve-out, but nothing is wasteful.

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?

For a 14-parameter tool with no output schema, the description covers the modes, defaults, and retention that shape a correct call. It leaves route, logger, release, user_id, environment, and message_chars untouched, and return shape is only implied by the cursor parameter, which is the main residual gap.

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 coverage is 64% across 14 parameters, so the description must add meaning, and it does for the most decision-relevant ones: trace_id, q, level, and group_by. It also clarifies a real semantic subtlety — trace_id returns lines 'however old', overriding the retention/default-range framing — which the schema does not state.

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 names a specific verb and resource ('Application log lines from the backend SDK') and adds the two output modes ('newest first, or counts with group_by'), which an agent cannot infer from the name alone. It is clearly distinguishable from siblings like search_traces or search_error_events.

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?

It gives concrete when-to-use guidance: 'Use it to see what happened around an error' and the selection rule between trace_id (one request's lines) and q plus level (broad search). It does not explicitly exclude or redirect to sibling tools such as search_traces, so it stops short of full alternative routing.

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.

Resources