Skip to main content
Glama

Recent log errors

get_recent_errors
Read-onlyIdempotent

Retrieves ERROR and WARN log entries with stack traces, timestamps, and repeat counts from project log files, redacting secrets, when a snapshot's 10 most recent errors are insufficient.

Instructions

Returns ERROR and WARN entries from the project's .log files (logs/, log/ and the project root), with stack traces, timestamps and repeat counts. Secrets are redacted. Use this when the snapshot shows errors and you need more than its 10 most recent, or the full stack traces.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_recent_errors"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoAbsolute path to the project root. Optional: defaults to the client's workspace root, or the server's working directory.
limitNoMaximum number of entries to return, newest last. Default 50.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.3
    • addedInput schema / properties / cwd / description
      Added value: +"Absolute path to the project root. Optional: defaults to the client's workspace root, or the server's working directory."
    • addedInput schema / properties / limit / default
      Added value: +50
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of entries to return, newest last. Default 50."
    • addedInput schema / properties / limit / maximum
      Added value: +200
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • changedInput schema / properties / limit / type
      Previous value: -"number"New value: +"integer"
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the lower bar applies. The description still adds real value by disclosing the search locations and secret redaction, though it says nothing about cost on large log trees or how it behaves when no log files exist.

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, front-loaded with what is returned, then the decision rule. Every clause carries information: sources, entry contents, redaction, and the comparison against the snapshot.

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?

For a two-optional-parameter read tool with no output schema, the description covers sources, returned fields, redaction, and ordering context; the remaining details live in the schema and annotations. Nothing essential to calling it correctly is missing.

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%, so cwd and limit are already fully documented with defaults and bounds. The description adds no parameter-level detail beyond the implicit recency framing, which is the expected baseline when the schema does the work.

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 ('Returns ERROR and WARN entries from the project's .log files'), enumerates the directories searched, and lists what each entry carries (stack traces, timestamps, repeat counts). This is concrete enough that an agent can distinguish it from get_session_snapshot without reading either schema.

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?

Gives an explicit trigger: use it when the snapshot shows errors and you need more than its 10 most recent entries or full stack traces. That names both the condition and the alternative source, so the routing decision is settled by the description alone.

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