Skip to main content
Glama

log_search

Search log files for specific keywords, returning only matching lines from the last N lines. Filter by path to focus on a particular log file.

Instructions

Zoek letterlijke trefwoorden in de laatste regels van een logbestand.

keywords moet minimaal één niet-lege tekenreeks bevatten; een regel wordt opgenomen als één van de trefwoorden erin voorkomt. De vergelijking is hoofdlettergevoelig. Met path wordt een specifiek bestaand bestand onder allowed_log_dirs gekozen. Zonder path gebruikt de tool het eerste bestaande bestand uit wp_log_candidates; als dat ontbreekt volgt een NOT_FOUND-fout. n bepaalt hoeveel laatste regels vóór filtering worden gelezen. De tool is alleen-lezen en retourneert het gebruikte pad en uitsluitend de overeenkomende regels via {success, data, error, meta}. Gebruik tail wanneer geen filtering nodig is.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
pathNo
keywordsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description fully discloses behavioral details: it is read-only, case-sensitive, returns a specific output format {success, data, error, meta}, and handles missing files with a NOT_FOUND error. No contradictions.

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 concise and well-structured, front-loading the main purpose and then detailing parameters and behavior in a logical order. Every sentence adds value without repetition or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the parameter count, lack of annotations, and presence of an output schema, the description covers all necessary aspects: input requirements, default behavior, error states, output format, and comparison to sibling tools. No gaps remain.

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?

The schema has 0% description coverage, but the description explains all parameters: 'n' (number of lines to read before filtering), 'path' (specific file under allowed_log_dirs or default fallback), and 'keywords' (non-empty strings, case-sensitive matching). This adds critical 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's function: searching literal keywords in the last lines of a log file. It explicitly distinguishes from the sibling 'tail' tool, saying to use tail when no filtering is needed, which helps avoid ambiguity.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool versus alternatives, such as when filtering is needed, and gives specific instructions for each parameter, including the requirement that keywords must be non-empty and case-sensitive.

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/gerard-kanters/mcp-linux-tools'

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