Skip to main content
Glama
KevinBuettner

docent-terminal-mcp

session_logs

Manage retention of terminal session logs: keep a session's logs for future reference or delete them on close or immediately when sensitive output must be removed.

Instructions

Keep or delete a session's logs (its log directory: the full output, regions, raw bytes). The usual rule: a closed session's logs are deleted once they have been neither written nor read for a few days (DOCENT_TERMINAL_MCP_KEEP_CLOSED_DAYS, default 3). Reading a closed session's logs needs none of this -- and counts as use: the read, search and regions tools work on them as they are. Change how a session's logs are kept only when the user asks: "keep" exempts a session they want to refer back to; "delete_on_close" and "delete" are for logs that showed something sensitive. Deleting cannot be undone: ask the user first, and never delete another agent's or a human's logs unasked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes"keep": never delete them (when the user asks for that); "default": back to the usual rule; "delete_on_close": delete them when the session closes (at once if it is closed); "delete": delete them now (closed sessions only)
sessionYesthe session's name, live or closed (an earlier session of a reused name is NAME.N, as session_list shows)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the default retention rule and env var (DOCENT_TERMINAL_MCP_KEEP_CLOSED_DAYS, default 3), that reading counts as use, that deletion is irreversible, and a social/auth constraint about not deleting other agents' or humans' logs unasked.

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-loaded with the core verb and resource, then retention rule, then guidance. Mostly tight, though the retention and irreversibility points could be trimmed slightly without losing meaning.

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?

An output schema exists so return values need no explanation, and the description fully covers the one non-obvious thing an agent needs: the retention semantics behind each action and the irreversibility of delete. Nothing material is missing for a 2-parameter mutating tool.

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% and the enum values are already documented in the schema, so baseline is 3. The description adds real meaning on top by tying actions to intent (keep = exempt a session the user refers back to; delete_on_close/delete = logs that showed something sensitive), which helps action selection beyond the schema's literal phrasing.

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 pair (keep/delete) and a specific resource (a session's log directory: full output, regions, raw bytes). It is clearly distinguishable from siblings like read/search/regions, which it explicitly contrasts itself against.

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

Usage Guidelines5/5

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

Gives explicit when-to-use (only when the user asks to change retention), when-not-to-use ('Reading a closed session's logs needs none of this'), and names the alternatives (read, search, regions) plus the conditions selecting each action ('keep' for refer-back, 'delete_on_close'/'delete' for sensitive logs).

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