Skip to main content
Glama
chrisliebaer

claude-subagent-mcp

by chrisliebaer

claude-subagent-mcp

MCP-Server, der einem Agenten strukturierte und vollständige Einblicke in das .jsonl-Log eines Claude-Code-Agenten gewährt, ohne die Rohdatei zu lesen. Er spricht MCP 2026-07-28 über stdio mittels mcp==2.0.0.

Tools

  • get_last_status(path, count, after_line=0) gibt die letzten count Assistentenzeilen zurück, die sichtbare Textblöcke enthalten, und umfasst alle Textblöcke jeder zurückgegebenen Zeile.

  • get_last_tools(path, count, after_line=0) gibt die letzten count Assistentenzeilen zurück, die Tool-Aufrufe mit Name und Eingabe, aber ohne Ergebnisse enthalten, und umfasst alle Tool-Aufrufe jeder zurückgegebenen Zeile.

count wird nach dem Filtern angewendet, sodass genau count passende Zeilen zurückgegeben werden, sofern so viele existieren. after_line ist eine Untergrenze für die Rohzeilennummern, und es werden nur Zeilen berücksichtigt, die streng größer als dieser Grenzwert sind. Übergeben Sie die höchste bereits gesehene line als after_line, um Wiederholungen zu unterdrücken. Zurückgegebene line-Werte sind Rohzeilennummern der Datei und enthalten daher Lücken. Eine unvollständige letzte Zeile wird ignoriert. Jede andere Zeile, die nicht geparst werden kann, führt dazu, dass das Tool einen Formatfehler meldet.

Related MCP server: mcp-session-insight

Installation in Claude Code

claude mcp add --scope user claude-subagent-log -- uvx --from git+https://github.com/chrisliebaer/claude-subagent-mcp claude-subagent-mcp

Pinnen Sie einen Tag oder einen Commit mit @<ref> hinter die Repository-URL, um zu verhindern, dass sich der Server unter einem Agenten ändert. Verwenden Sie für einen lokalen Checkout stattdessen uv --directory <checkout> run claude-subagent-mcp als Befehl.

Entwicklung

uv run pytest
uv run ruff check . && uv run ruff format --check .
uv run mypy src tests

Available Tools

2 tools
get_last_statusA

Return the last count status messages the agent emitted.

Status messages are the visible text blocks of assistant lines. Every assistant line carrying at least one text block counts as one entry and all of its text blocks are returned. Entries are ordered oldest first and tagged with their raw line number.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the agent's .jsonl log file.
countYesNumber of qualifying log lines to return, counted after filtering.
after_lineNoOnly lines with a number strictly greater than this are considered. Pass the highest `line` you already received to suppress repeats, 0 means all.

Output Schema

ParametersJSON Schema
NameRequiredDescription
entriesYes

TDQS

A3.8/5.0
Behavior4/5

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

Without annotations, the description carries the full burden and does well by explaining that entries are ordered oldest first, tagged with line numbers, and that every assistant line with at least one text block counts as one entry. This provides clear behavioral context beyond the schema.

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?

The description is three sentences, well-structured, and front-loaded with the core purpose. Every sentence adds value without redundancy, though it could be slightly more concise.

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?

The tool is straightforward with only three parameters, has an output schema (though not shown), and the description thoroughly explains return behavior. No obvious gaps remain for an agent to successfully invoke the tool.

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 coverage is 100% with detailed parameter descriptions for `path`, `count`, and `after_line`. The description adds no additional parameter semantics beyond what the schema already provides, so the baseline of 3 is appropriate.

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 that the tool returns the last `count` status messages, specifies that it deals with assistant line text blocks, and distinguishes it from potential sibling tools like get_last_tools by focusing on status messages only.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus get_last_tools, nor does it mention any preconditions or alternative scenarios. The agent must infer use cases from the description alone.

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

get_last_toolsA

Return the last count tool-calling lines the agent emitted.

Every assistant line carrying at least one tool call counts as one entry and all of its tool calls (name and input, without results) are returned. Entries are ordered oldest first and tagged with their raw line number.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the agent's .jsonl log file.
countYesNumber of qualifying log lines to return, counted after filtering.
after_lineNoOnly lines with a number strictly greater than this are considered. Pass the highest `line` you already received to suppress repeats, 0 means all.

Output Schema

ParametersJSON Schema
NameRequiredDescription
entriesYes

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses several behavioral traits: each assistant line with at least one tool call counts as one entry, only tool call names and inputs (not results) are returned, entries are ordered oldest first, and each is tagged with the raw line number. This goes beyond the schema and gives important context, though it does not explicitly state read-only behavior.

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 concise and well-structured: the first sentence delivers the core purpose, and the second provides necessary clarifications about counting, ordering, and tagging. Every sentence provides substantive value with no redundancy or filler.

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?

The description explains the tool's return semantics, filtering behavior, and ordering well, and an output schema exists to further clarify the response shape. It is complete enough for a simple retrieval tool, though it does not mention error conditions or explicitly frame when this tool is preferable over the sibling, leaving a small gap.

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?

The input schema already contains 100% coverage with detailed descriptions for all three parameters, including after_line's pagination use. The description adds some context for count ('counted after filtering') but largely does not enhance beyond what the schema already provides, so the baseline of 3 is appropriate.

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 opens with 'Return the last `count` tool-calling lines the agent emitted,' which clearly states the verb (Return), resource (tool-calling lines from the agent's log), and scope (last count). It also distinguishes itself from the sibling get_last_status by focusing specifically on tool calls rather than status.

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?

The description provides thorough operational details (e.g., counting rules, ordering, after_line suppression) but does not explicitly state when to use this tool versus get_last_status or any alternative. Its usage is implied from the main verb and context, but clear exclusions or alternatives are absent.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.1.0
    • First observedget_last_status
    • First observedget_last_tools

TDQS

A3.9/5.0

Scored across 2 tools

Disambiguation5/5

The two tools are clearly distinct: one retrieves text/status messages, the other retrieves tool call details. There is no overlap in purpose or output.

Naming Consistency5/5

Both tool names follow a consistent `get_last_<entity>` pattern, making it easy for an agent to predict the naming convention.

Tool Count3/5

With only 2 tools, the server feels thin for a general subagent monitoring use case. However, it may be appropriately minimal if the server's scope is intentionally limited to just observing agent output.

Completeness3/5

The tools cover reading status and tool calls, which are core observation needs. However, there are no tools for filtering by type, searching, or managing the agent's state, leaving notable gaps for a monitoring server.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to automatically inspect and analyze application runtime log files for debugging and troubleshooting. Supports monitoring multiple log directories simultaneously with tools for listing, reading, searching, and paginating through log files.
    8
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to query and analyze past Claude Code sessions, providing structured insights like file changes, decisions, errors, and git history across projects.
    11
    11 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Indexes and searches agent conversation logs from Antigravity and Cursor workspaces, enabling semantic search, token analysis, and benchmarking over local SQLite storage.
    14 npm
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    A read-only MCP server that exposes local coding-agent session logs as three tools for introspection of recent work, debugging tool failures, and tracking token usage and estimated cost without parsing log files.
    3
    MIT