Skip to main content
Glama

report_session

Export a serial debug session as a Markdown report with fault analysis and appended raw logs, ready for delivery or sharing.

Instructions

把一次串口会话导出成 Markdown 交付报告(故障分析 + 原始日志附后)。

调完一次问题,把「现象/证据/结论/下一步」直接变成可交付文件——毕设报告、 工单、给同事看都行。原始日志原样附在末尾,避免「只有结论没有证据」。

数据来源:给 handle(活动会话)或 fname(已落盘日志,来自 sessions_list); 都不给时若恰好只有一份日志会自动用它。 默认落点 <数据根>/reports/;已存在不覆盖(要覆盖传 overwrite=True + confirm=True)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fnameNo
handleNo
confirmNo
out_pathNo
overwriteNo
tail_linesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and largely meets it: it discloses the default drop location (<数据根>/reports/), a no-clobber policy, and the exact escape hatch (overwrite=True + confirm=True). It does not mention permissions, error conditions, or size limits, but the safety-relevant write behavior is well covered.

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?

Front-loads the core purpose in a bolded first line, then layers data-source and overwrite rules in short paragraphs. Every sentence carries information; the only mild redundancy is restating the value proposition ('毕设报告、工单、给同事看').

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-value explanation is unnecessary, and the description still covers data sources, output location, and overwrite semantics. The undocumented tail_lines parameter and absent error/edge-case notes keep it from being fully complete.

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. It explains fname (from sessions_list), handle (active session), the mutual default behavior, out_path (default report dir), and the overwrite/confirm pairing. Only tail_lines is left undocumented, a small remaining gap.

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?

States a specific verb (导出/export) and resource (串口会话/serial session) plus the concrete artifact produced (Markdown 交付报告 with 故障分析 + raw log). This clearly separates it from siblings like serial_session_log (logging) and analyze_log (analysis-only).

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

Usage Guidelines4/5

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

Gives an explicit trigger ('调完一次问题' – after completing a debugging session) and enumerates data-source selection rules (handle vs fname vs auto-pick single log). It does not explicitly state when to prefer a sibling tool over this one, so it stops short of a 5.

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