Skip to main content
Glama

app_log

Reads the tail of an app's stderr log on a given instance to debug crashes, blank renders, or misbehavior. Returns the last lines, total count, and truncation status.

Instructions

Tail of the stderr log of the app launched on an instance (launch_app / open_file) — read it when an app crashed, drew nothing, or misbehaves.

Returns {"ok", "instance", "path", "lines": [...], "total_lines", "truncated"} (max 500 lines per call). The log is per instance and overwritten by each launch on that instance. Instance 1 (start-display.sh) logs to /tmp/chromium-x1.log instead. Fails (isError) if no log exists for that instance yet.

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

Input Schema

NameRequiredDescriptionDefault
linesNo
instanceNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does: 500-line cap per call, per-instance log lifecycle with overwrite on every launch, the instance-1 exception, and an explicit isError failure mode when no log exists yet. That is exactly the behavioral context a caller needs before invoking a diagnostic read.

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?

It is front-loaded with the purpose and trigger symptoms, with the caveats packed into efficient parentheticals. The one wasteful element is the return-shape enumeration, which restates an output schema that already exists and consumes about a third of the text.

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 an output schema exists, the description need not explain return values further, and it still covers failure behavior, truncation limits, and log lifecycle. Nothing needed to call a per-instance log reader correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does partially: it establishes that 'lines' is capped at 500 per call and that 'instance' selects a per-instance log with a special path for instance 1. It never states that 'lines' is the count to return or how the default of 50 interacts with the cap, leaving one inference to the agent.

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?

It names a specific resource (the stderr log tail) and the exact scope (per instance, produced by launch_app/open_file), so it is distinguishable from siblings like status or window_info without inspecting schemas.

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?

It gives concrete trigger conditions — an app crashed, drew nothing, or misbehaves — and identifies the sibling tools whose launches create the log. It also flags the routing caveat that instance 1 (start-display.sh) writes to /tmp/chromium-x1.log instead, which keeps an agent from chasing the wrong path.

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