Skip to main content
Glama

analyze_session

Analyze a coding-agent session transcript to surface tool failures, loops, test outcomes, permission issues, and costs, highlighting findings that need human review.

Instructions

Analyse one session transcript end to end.

Returns tool usage and failure rates, detected loops, test-run outcomes, permission posture, cost, and a short list of findings worth a human's attention. Prompt text and file contents are never included.

Args: path: Path to a .jsonl session transcript. loop_threshold: How many repeats of one action count as a loop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
loop_thresholdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses that prompt text and file contents are never included and indicates a read-only analysis function, giving reasonable insight into behavior.

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 compact and organized with a short summary followed by parameter explanations. No redundant or filler content is present.

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?

Given an output schema exists, the description adequately summarizes the returned analysis items without needing exhaustive detail. It provides enough context for an agent to understand the tool's purpose and key inputs.

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?

Both parameters are described in the description text despite having no schema annotations: path is a .jsonl transcript path and loop_threshold defines the repeat count for loop detection. The explanations are brief but sufficient.

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?

The description clearly states the tool analyzes a single session transcript and lists the types of results returned, distinguishing it from simple listing or focused sub-analyses. It does not explicitly name sibling tools, but the scope is unambiguous.

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?

It indicates this is for end-to-end analysis and enumerates outputs, but it does not explicitly state when to choose this over the sibling tools find_loops or cost_report, which overlap in detected loops and cost reporting.

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

Deploy Server

Other Tools