Skip to main content
Glama

Find anomalous log lines

analyze_logs
Read-only

Ranks log lines by severity and unusual wording, surfacing anomalies worst first. Use to identify critical entries without reading the whole file.

Instructions

Score a log file's lines by severity and how unusual their wording is, and return the anomalies, worst first. Deterministic — no model call, no API key. Call this when you have a log file and want the handful of lines worth reading rather than the whole file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
logFileYesAbsolute path to the log file
thresholdNoAnomaly score cutoff, 0-1 (default 0.5)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.2

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, non-destructive and closed-world, so the safety profile is covered. The description adds real value beyond that by disclosing that scoring is deterministic with no model call or API key, and that results are ordered worst-first. It omits any note on result limits or volume handling.

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?

Two sentences, zero filler, with the core action and ranking front-loaded in the first sentence. The second sentence carries distinct usage and determinism information rather than restating the name.

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 no output schema, the description covers purpose, ranking, ordering and determinism. The remaining gap is absence of any detail on how many anomalies are returned or any cap on result size, which an agent might want to know.

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%, with both the path and the threshold range/default fully documented in the schema. The description adds no extra meaning to either parameter, so the baseline of 3 applies.

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?

States a specific verb and resource (score a log file's lines), the ranking method (severity + word rarity), and the output ordering (anomalies, worst first). This clearly separates it from siblings like analyze_file and scan_project.

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 an explicit when-to-use trigger ('you have a log file and want the handful of lines worth reading rather than the whole file'), which frames the alternative behavior. It stops short of naming a specific sibling tool to use instead, so it is clear context without explicit alternatives.

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