Skip to main content
Glama
LogLens
by Suteerth03

Get Error Context

get_error_context

Retrieves surrounding log lines for a given line id to view full stack traces and event sequences around a failure.

Instructions

Given a line id (from search_logs), return a wider window of surrounding log lines — useful for viewing a full stack trace or the sequence of events around a failure.

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": {
      "lineId": "<lineId>"
    },
    "name": "get_error_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
lineIdYesThe line id returned by search_logs
contextSizeNoLines before/after to include (default 5)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It discloses the read-only, window-expanding nature of the call, but says nothing about the maximum window (schema caps at 100), whether the anchor line itself is included, truncation near log boundaries, or the result ordering.

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?

A single well-formed sentence with the input requirement front-loaded and the rationale trailing after the em dash. No redundant or filler wording.

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 two-parameter read-only tool with full schema coverage and no output schema, the description covers input source, behavior, and typical use. Only boundary behavior and result shape remain unstated, which is a modest gap.

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 both lineId and contextSize are already documented, including the default of 5. The description reinforces that the window is centered on the given line but adds no syntax or formatting detail beyond the schema.

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?

States a specific verb and resource: return a wider window of surrounding log lines given a line id. It also names search_logs as the id source, which implicitly separates it from the search tool, though it says nothing about summarize_incident.

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?

Gives clear use cases (full stack trace, sequence of events around a failure) and ties invocation to a line id obtained from search_logs, establishing the workflow. It offers no explicit when-not guidance or comparison against alternatives.

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