Skip to main content
Glama
Context Budget Engine
by sivram04

log_smart

Extracts errors, warnings, and the last lines of a log file, helping AI agents review relevant excerpts instead of reading entire logs.

Instructions

Errors, warnings and the last lines lines of a log file, instead of the whole log.

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": {
      "path": "<path>"
    },
    "name": "log_smart"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
linesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations supplied, the description must carry the burden, and it does disclose the key behavioral trait: the tool filters/downsamples rather than dumping the file. However it omits whether errors and warnings come from the entire file or only from within the tail window, whether results are ordered or deduplicated, and whether it is strictly read-only. A critical ordering/count ambiguity is left to guesswork.

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 tight sentence fragment with zero filler, and the most important information (what is returned, and that it replaces the full log) is front-loaded. It reads slightly telegraphically as a noun phrase with no verb, but nothing is wasted.

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?

An output schema exists, so return shape need not be explained, and both parameters are at least gestured at. What is missing is the interaction between the two behaviors — whether the error/warning extraction is bounded by `lines` — which is exactly the ambiguity an agent must resolve before calling it correctly.

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 0%, so the description must compensate for both parameters. It does explain `lines` as the count of trailing lines and implies `path` is the log file to inspect, but it never states bounds for `lines` or what the 80 default means in practice, leaving part of the surface undocumented.

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 names the resource (a log file) and precisely what is returned: errors, warnings, and the last `lines` lines rather than the whole log. That return-scope statement distinguishes it from a plain full-read sibling such as read_smart, though the verb itself is elided (a noun-phrase fragment rather than 'Read errors and warnings...').

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

Usage Guidelines3/5

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

The phrase 'instead of the whole log' implies the usage context — reach for this when you want a distilled view rather than the full file — but it never states when to prefer it over alternatives or names read_smart explicitly. The guidance is implied rather than instructed.

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