Skip to main content
Glama

get_context

Retrieve full log entries surrounding a specific timestamp to understand what happened before and after an event, aiding in troubleshooting.

Instructions

Get full log entries around a specific timestamp — like grep -C for logs. Shows what happened before and after an event for troubleshooting.

Args: path: Path to local OpenSearch JSON file. index: OpenSearch index to query (requires OPENSEARCH_URL env). timestamp: Center timestamp (ISO format, e.g. "2026-06-03T01:05:05Z"). window_seconds: Seconds before and after timestamp to include (default 5). pod: Optional pod name filter — only show entries from this pod. limit: Max entries to return (default 50).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
podNo
pathNo
indexNo
limitNo
timestampNo
window_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations exist, so the description carries the burden. It mentions that the 'index' parameter requires the OPENSEARCH_URL env variable and gives default values for window_seconds and limit. However, it does not disclose the return format, ordering, or behavior when no logs are found, leaving some transparency gaps.

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 description is extremely concise: two clear sentences establishing purpose, followed by a bullet-style argument list. Every sentence adds value, and the structure is front-loaded with the core functionality.

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?

With 6 parameters, no schema descriptions, and no annotations, the description covers parameter semantics and a key environmental requirement (OPENSEARCH_URL). However, it omits whether path and index are mutually exclusive, does not clarify that timestamp is effectively required, and does not address error cases or output structure. An output schema exists, but the description itself is not fully complete for an agent to use without ambiguity.

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?

The schema has 0% description coverage, but the tool description compensates by listing all six parameters with explanations, including the timestamp format example, the role of pod as a filter, and default values. This adds significant meaning beyond the raw 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 clearly states the tool retrieves 'full log entries around a specific timestamp' and uses the analogy 'like grep -C for logs', which immediately conveys its purpose and distinguishes it from sibling tools like get_errors or query_logs.

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?

The description explicitly frames the tool for troubleshooting and provides context on when to use it (showing logs before and after an event). It does not explicitly state when not to use it or mention alternatives, but the usage context is clear and actionable.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nrapendra-singh/mcp-log-pruner'

If you have feedback or need assistance with the MCP directory API, please join our Discord server