Skip to main content
Glama

导出会话为 HTML

piweb_export_session
Idempotent

Export a pi coding session as an official single-file HTML for offline browsing or sharing; save it to local disk and return the path. Large sessions may take a few seconds.

Instructions

把会话导出成 pi 官方单文件 HTML(可离线翻阅/分享),写到本地磁盘并返回路径。大会话导出要几秒。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionYes会话 id / 名称
out_pathNo输出文件绝对路径;默认 <系统临时目录>/pi-web-export/<会话id>.html

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and idempotentHint=true; the description corroborates this by stating it writes to local disk and returns the path, and adds a latency warning for large sessions ('大会话导出要几秒') that annotations do not convey. It does not mention overwrite behavior or failure modes, but the added side-effect and performance context is genuinely useful.

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?

A single compact sentence that front-loads the core action and artifact, with the latency caveat appended. No redundant restatement of the title or schema.

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?

For a two-parameter tool with no output schema, the description covers the action, the file artifact, the returned path, and expected latency. Only minor details such as overwrite handling or error behavior are absent.

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 both parameters (session id/name and out_path with its default) are already fully documented in the schema. The description adds no syntax or format detail beyond what the schema provides, so the baseline 3 applies.

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), resource (session), and concrete artifact (single-file offline HTML written to local disk, path returned). This clearly separates it from read-only siblings like piweb_get_session or piweb_read_file, which do not produce a file artifact.

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 parenthetical '可离线翻阅/分享' implies the use case (offline reading/sharing), but there is no explicit when-to-use versus piweb_get_session or when-not guidance. Usage is only inferable.

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