Skip to main content
Glama
aem-troubleshooting-mcp-server

aem-troubleshooting-mcp-server

by navi00498

tail_log

Read-onlyIdempotent

Retrieves recent lines from an AEM log file via Sling Log Support and optionally filters them by regex or text to help diagnose issues.

Instructions

Return the last lines of an AEM log file via the Sling Log Support tailer (/system/console/slinglog).

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": "tail_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
grepNoRegex or case-insensitive text; only matching lines are returned
linesNoNumber of lines from the end of the log
log_nameNoLogger appender name, e.g. /logs/error.log/logs/error.log

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is fully covered elsewhere. The description adds the useful fact that data comes from the Sling Log Support tailer endpoint, but says nothing about blocking behavior, cost on large logs, or what happens when the named appender does not 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?

A single sentence that front-loads the operation and then supplies the data source, with no filler or redundancy. Nothing in it is wasted.

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?

An output schema exists, so return values need not be explained, and all three parameters are fully documented in the schema. The only real gap for a low-complexity read tool is the absent routing guidance versus the analyze_* siblings, which keeps it from a 5.

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 grep, lines (default 200, max 2000) and log_name (default /logs/error.log) all documented inline. The description adds no additional meaning about how grep interacts with the line limit, so the schema does all the work and baseline 3 applies.

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?

States a specific verb and resource ('Return the last lines of an AEM log file') and names the underlying mechanism (Sling Log Support tailer at /system/console/slinglog). This reads clearly as a raw tail operation, which implicitly separates it from analyze_error_log/analyze_request_log, but the description never explicitly draws that contrast.

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?

Usage is only implied: 'return the last lines' suggests a raw inspection use case, so an agent can infer it should reach for this when it wants unprocessed log output. There is no explicit statement of when to prefer it over the sibling analysis tools, and no mention of prerequisites such as the log appender needing to exist.

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