Skip to main content
Glama

Typebar (formerly SuperDocs)

get_session_history

Returns complete message history (user and AI), final document HTML with chunk IDs preserved, attachment list, and editor actions (font, color, alignment changes). Use to continue editing a document you started in a prior session. The AI rehydrates with full context of all prior decisions, chunk IDs, and attachments. Pass include_document_html=false to skip the full document body when you only need the conversation.

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": {
      "session_id": "<session_id>"
    },
    "name": "get_session_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYes
focus_document_idNoDurable id of the document to focus on restore (e.g. the file the user clicked in the Files view). When set, that document is shown in the editor and marked focused in the roster; omit to use the session's own last-focused document.
include_document_htmlNoWhen false, omit the restored document's full HTML body (document_state.html_content) to keep your context small — agents that just need the conversation + metadata should set false. Default true (the web app needs the body to re-render the editor).

Output Schema

NameRequiredDescriptionDefault
messagesYesOrdered list of messages. Each item has: id (string), sender ('user' or 'ai'), content (string), timestamp (ISO 8601), turn_index (int), checkpoint_id (string or null — present on turns recorded after the revertability feature shipped; null for legacy turns where revert is unavailable).
session_idYesSession identifier.
editor_actionNoClient instruction: 'update' (load document_state HTML into editor), 'clear' (reset editor), or 'keep' (no change).keep
restore_errorNoTrue ONLY when the document RESTORE itself failed transiently (its content load timed out or errored, typically under backend memory pressure) — as distinct from a genuine document-less session ('clear') or an intentional no-change ('keep'). editor_action stays 'keep' so the editor is left exactly as-is (never wrongly cleared); this flag lets the client offer a non-blocking retry instead of silently leaving the user on an empty editor. Null/absent on success and on the genuine no-document path.
document_stateNoCurrent document state. Present if the session has an active document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the whole burden and does real work: it discloses the constituent parts of the payload, notes that chunk IDs are preserved, and explains the rehydration semantics ('AI rehydrates with full context of all prior decisions'). It omits read-only assurance, authorization needs, and whether calling it mutates session state, which matters for a restore-path tool.

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?

Four sentences, front-loaded with the return payload, then purpose, then the context-saving flag. Efficient overall, though the third sentence restates the schema's own include_document_html note rather than adding new information.

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 values need no further explanation, yet the description still summarizes them usefully. With only three simple top-level params and no nesting, the definition is close to complete; the missing piece is how to source session_id and how partial/failed sessions behave.

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 coverage is 67%; focus_document_id and include_document_html are already well documented in the schema, and the description largely restates the include_document_html rationale while adding the context-size framing. The required session_id has no schema description at all and the prose never says where an agent obtains one, which is the real gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Returns') and enumerates exactly what comes back: message history, document HTML with chunk IDs, attachments, editor actions. That is far more informative than the name alone. It falls short of 5 because it never contrasts with the close sibling get_document_detail, leaving the agent to infer why it would pick session history over the document-detail tool.

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?

'Use to continue editing a document you started in a prior session' gives a clear positive trigger, and the include_document_html=false note names a concrete usage condition. There are no explicit exclusions or named alternatives, so it stops short of full routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.