Session Diagnostics
manage_diagnosticsManages session diagnostics and maintenance: summarize or prune audit logs, verify or replay recorded state, report token usage, and audit GM-only visibility while leaving play content unchanged.
Instructions
Manage session diagnostics and maintenance surfaces separate from play-facing session controls. compress summarizes the audit log while compact prunes it irreversibly; verify compares live state with recorded hashes and replay reads the retained log, and both are read-only; context_report emits a per-section token ledger and accepts budget_tokens to pack it; visibility_check records its decision in the audit log while visibility_audit reads recent decisions; health, subscribe, and category reassignment do not change Novel content. compact is GM-only. Use when: reporting health or context size, summarizing or compacting the audit log, subscribing, reassigning a category, appending/reading the event log, verifying or replaying state, or scanning a draft for GM-only disclosure. Do NOT use when: recapping play, setting verbosity, or reordering the briefing — use manage_context.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "manage_diagnostics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | normal or terse (verbosity). | |
| text | No | Observation text (event). | |
| tier | No | Compression tier to assemble (recap; REQ-592). | |
| query | No | Optional search term matched against tool name, description, and title (discover). | |
| action | Yes | health, context_report, compress, compact, subscribe, category, event, history, verify, replay, visibility_check, or visibility_audit. | |
| detail | No | discover response detail: summary (default) or schema (live input schemas for the matches; requires query; REQ-609). | |
| format | No | Recap/compress output notation (recap, compress; default markdown; REQ-072g). | |
| source | No | Event source classification (event). | |
| topics | No | Notification topics to subscribe to (subscribe). | |
| audience | No | Audience badge for a visibility check (visibility_check; default the active badge). | |
| category | No | New category label, or null/empty to restore the default (category). | |
| gm_notes | No | GM-only free-text notes returned only to the Game Master badge (recap). | |
| ordinals | No | Exact event ordinals to return in order (history; REQ-591). | |
| sections | No | Ordered list of briefing sections (briefing_order). | |
| sessions | No | Number of recent sessions to retain live; triggers irreversible compaction (compact; default TTRPG_AUDIT_RETENTION_SESSIONS). | |
| to_event | No | Target event ordinal for replay inspection (replay; default the newest retained entry). | |
| max_rolls | No | Significant rolls to return, bounded 1–50 (recap; default 5; REQ-072e). | |
| supersede | No | Ordinal of an event this observation replaces (event). | |
| tool_name | No | Registered tool name to reassign (category). | |
| session_id | No | Archived session id to include in recap (recap). | |
| max_entries | No | Positive integer; returns a non-mutating summarize prompt over the most recent entries (compress). | |
| budget_tokens | No | Positive token budget for tier assembly (recap; REQ-592) or for ledger packing (context_report; REQ-610). | |
| max_transitions | No | Scene transitions to return, bounded 1–20 (recap; default 5; REQ-072e). | |
| through_ordinal | No | Return events up to and including this ordinal (history). | |
| include_superseded | No | Include superseded events (history; default true). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Human-readable text envelope mirroring the structured result (REQ-001, REQ-548a). | |
| status | Yes | Machine-readable result status: OK, NEED_INPUT, WARNING, PARTIAL, or an error category (REQ-002, REQ-548c). |