Skip to main content
Glama

Export Session Diagnostics

terminal_export_diagnostics

Export a bounded ZIP snapshot of retained terminal session evidence for diagnostics, using metadata by default or sensitive raw bytes when explicitly included; returns archive ID, size, and SHA256.

Instructions

Export a bounded ZIP snapshot of retained Session evidence. include_raw=true explicitly includes sensitive terminal/output/write bytes. Default exports metadata only. Returns ID, size and SHA256; download with terminal_read_diagnostic. Host memory retains at most four archives for 15 minutes, evicting oldest first. No filesystem path is exposed.

Input Schema

NameRequiredDescriptionDefault
session_idYesActive Session ID or short reference.
include_rawNoExplicitly include terminal contents; default false.

Output Schema

NameRequiredDescriptionDefault
sizeYes
sha256Yes
expires_atYes
diagnostic_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already signal a non-read-only, non-idempotent operation; the description adds crucial behavior: sensitive byte inclusion, metadata-only default, ID/size/SHA256 return values, a four-archive/15-minute retention limit with oldest-first eviction, and no filesystem path exposure.

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?

Four tight sentences, front-loaded with what is exported, followed by the sensitive-data flag, return values, download route, and retention behavior. No sentence is redundant.

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?

Even though an output schema exists, the description supplies the operational context an agent needs: default vs sensitive content, how to retrieve the archive, retention/eviction behavior, and the absence of a filesystem path.

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 100%, so the baseline is 3, but the description adds meaningful semantics for include_raw beyond the schema by emphasizing sensitive terminal/output/write byte inclusion and the metadata-only default. session_id remains adequately covered by 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?

States a specific verb+resource: export a bounded ZIP snapshot of retained Session evidence. It clearly distinguishes from the sibling download tool by naming terminal_read_diagnostic for retrieval.

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?

Explains that default exports are metadata-only and include_raw=true is required for sensitive terminal/output/write bytes. It also routes the agent to terminal_read_diagnostic for download, though it does not explicitly compare against other diagnostic-read siblings.

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