Skip to main content
Glama

read_logs

Read OpenSearch log files (JSON or CSV) and return a compact log table with ~98% token reduction. Strip Kubernetes metadata and duplicate fields, auto-detect log type, and filter by status, response time, or time range.

Instructions

Read an OpenSearch log file (JSON or CSV) and return compact log table. Strips kubernetes metadata, duplicate fields — ~98% token reduction. Supports both HTTP access logs and application logs (auto-detected).

Args: path: Path to the OpenSearch JSON or CSV export file. limit: Max entries to return (default 100). status_filter: Only show entries with this HTTP status (e.g. "500", "4xx"). Only applies to HTTP access logs. min_response_time: Only show entries slower than this (ms). Only applies to HTTP access logs. time_from: ISO timestamp lower bound filter (e.g. "2026-06-03T01:05:05Z"). time_to: ISO timestamp upper bound filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
limitNo
time_toNo
time_fromNo
status_filterNo
min_response_timeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It discloses key behaviors: stripping Kubernetes metadata and duplicate fields for ~98% token reduction, auto-detecting log types, and returning a compact table. It does not mention read-only nature but implies it, and lacks details on rate limits or auth, but overall transparent.

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 front-loaded with a concise purpose statement, followed by key transformations (stripping, token reduction, auto-detection). The Args section is clearly separated and each parameter is described in a single line. No redundant or unnecessary sentences.

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 tool has 6 parameters, no annotations, and an output schema exists, the description covers the main functionality and filtering options. It does not explain return values (handled by output schema) but could mention file path assumptions or performance notes. Overall, sufficient for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. The 'Args:' section thoroughly explains all 6 parameters with details like default (limit), applicability notes (status_filter/min_response_time only for HTTP access logs), and format (ISO timestamps for time_from/time_to), adding significant value beyond the schema types.

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 'Read an OpenSearch log file (JSON or CSV) and return compact log table', specifying the action, resource, and output format. It also distinguishes from siblings by highlighting file-based reading vs likely query-based tools like query_logs, and mentions token reduction and auto-detection of log types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives (e.g., query_logs, summarize_logs). It only describes what it does without providing conditions, prerequisites, or exclusions, leaving the agent to infer from sibling names.

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