Skip to main content
Glama

forge_logs

Query structured event logs from Forge runs to debug failures, audit tool execution history, and investigate errors without re-running processes.

Instructions

Query the structured JSONL event stream that forge writes on every tool call throughout a run. Filter by runId, moduleId, phase (planning, execution, validation, review, retry, memory, session, tool_call, plan_validation), severity (info, warn, error), and limit. Lets agents reconstruct what happened without re-running anything, and lets humans audit a run after the fact without paging through console output.

Behaviour:

  • READ-ONLY, idempotent.

  • Reads .forge/logs/<runId>.jsonl. When runId is omitted, the most recently modified log file in .forge/logs/ is used.

  • runId is guarded against path traversal via _RUN_ID_PATTERN.

  • JSON parse errors on individual lines are silently skipped — a single corrupt line does not crash the query.

  • No authentication, no network, no rate limits.

Use when:

  • A debugger agent needs the sequence of events leading up to a module failure — especially useful for diagnosing why validation failed even though review passed.

  • A user wants to audit what a forge run actually did, after the fact, without re-running anything.

  • The orchestrator wants to confirm that a prior phase completed successfully before transitioning.

  • Investigating an escalation: pull all severity: "error" entries for the run and read them in order.

Do NOT use for:

  • Live progress display — read /tmp/forge-status.json which the server refreshes on every tool call, or call session_state with action: "list".

  • Appending new entries — the server writes logs automatically; there is no external append API.

  • Long-term knowledge — that's memory_save / memory_recall.

Returns: { runId, entries: [...], total }. Each entry is { timestamp, runId, phase, moduleId, event, severity, data }. data is a free-form object whose shape depends on the event type.

Example: forge_logs({ runId: "2026-04-15-1", phase: "validation", severity: "error", limit: 10 }) → { "runId": "2026-04-15-1", "total": 2, "entries": [ { "timestamp": "...", "phase": "validation", "moduleId": "m3", "event": "validate", "severity": "error", "data": { "passed": false, "score": 0.5, ... } }, ... ] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdNoRun ID to query. If omitted, uses most recent log file.
moduleIdNoFilter by module ID
phaseNoFilter by phase name
severityNoFilter by severity level
limitNoMax entries to return (default: 50)
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 delivers comprehensive behavioral disclosure. It explicitly states 'READ-ONLY, idempotent,' describes file system behavior, security measures (path traversal guard), error handling (silent skip of corrupt lines), and operational characteristics (no authentication, no network, no rate limits).

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?

The description is well-structured with clear sections (purpose, behavior, use cases, exclusions, returns, example) and every sentence adds value. It's comprehensive without being verbose, using bullet points and clear headings to organize information efficiently.

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 read-only query tool with 5 parameters and no output schema, the description provides complete context. It explains the tool's purpose, behavior, usage scenarios, exclusions, and detailed return format. The example demonstrates both input and output, compensating for the lack of output schema.

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 the baseline is 3. The description lists the filterable parameters in the opening sentence and provides an example showing parameter usage, but doesn't add significant semantic value beyond what the schema already documents. The description of 'runId' behavior when omitted is already covered in the schema.

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?

The description clearly states the tool's purpose: 'Query the structured JSONL event stream that forge writes on every tool call throughout a run.' It specifies the exact resource (structured JSONL event stream) and action (query with filtering), and distinguishes itself from siblings by mentioning specific alternatives like 'session_state' and 'memory_save'/'memory_recall'.

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?

The description provides explicit 'Use when' scenarios with four specific use cases (debugging, auditing, orchestration confirmation, investigation) and 'Do NOT use for' guidance with three clear exclusions (live progress display, appending entries, long-term knowledge). It names alternative tools for each exclusion case.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TT-Wang/forge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server