Skip to main content
Glama

logs_tail_context

Fetch recent log lines from all apps that contain a specific trace ID, so you can correlate logs with a distributed trace.

Instructions

Get recent logs correlated with a specific trace ID. Searches across all apps for log lines containing the trace 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": {
      "trace_id": "<trace_id>"
    },
    "name": "logs_tail_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax log lines
targetNoNamed backend instance to query (configured: default). Defaults to the primary.
trace_idYesTrace ID to search for in log lines

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description usefully discloses that the operation searches log lines containing the trace ID and spans all apps, narrowing what 'correlated' means. However, it leaves the recency window, result ordering, behavior when no matches exist, and safety characteristics unstated.

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?

The two short sentences are front-loaded and efficient. The first states the purpose, while the second adds meaningful search mechanism and scope without unnecessary repetition.

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 simple three-parameter lookup, the description and fully documented schema provide enough information to select and invoke the tool. Since there is no output schema, the unspecified response shape is a residual gap, along with the undefined meaning of 'recent' and lack of ordering details.

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%, including the required trace ID, line limit, and backend target, so the baseline is 3. The description reinforces how trace_id is used but adds no parameter-specific detail beyond the schema, particularly for limit or target.

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 the action and resource: retrieving recent log lines associated with a specific trace ID. The cross-app search scope and trace-ID matching distinguish its niche, although it does not explicitly contrast itself with sibling log or trace tools.

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 provides a clear use case: use this when investigating logs for a known trace ID across all apps. It does not explain when another log-search approach would be preferable or note any exclusions, such as searches without a trace ID.

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