Skip to main content
Glama

Typebar (formerly SuperDocs)

focus_session_document

Make document_id the focused document (the editor's active document and the default edit target). Accepts either the session slot id OR the permanent document id (the UUID shown by list_documents/Files, returned as durable_document_id by list_session_documents). Persists the outgoing focused document into the session's document map and returns the now-focused document's HTML.

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>",
      "document_id": "<document_id>"
    },
    "name": "focus_session_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYes
document_idYes
include_htmlNoInclude each document's full reassembled HTML body. Default false (token-light — recommended for AI agents enumerating or switching tabs): returns only ids, title, section count, focused flag, and page setup, omitting the body which can be hundreds of KB per document. The web app passes true to render document content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description does real work by disclosing a side effect beyond the name: the outgoing focused document is persisted into the session's document map. But the claimed return of 'the now-focused document's HTML' conflicts with include_html defaulting to false, which the schema says omits the body entirely — a misleading promise about the mutation's result.

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?

The primary action and its semantics are front-loaded in the first sentence, followed by parameter sourcing and then side effects/return. It is dense but every clause carries information; the only weak element is the trailing HTML claim, which contradicts the default behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description covers the essentials: state change, outgoing-document persistence, id sourcing, and an intended return value. It leaves gaps on what happens if the document is not open in the session, error behavior, and why it claims to return HTML when include_html defaults to false.

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 only 33%, so the description must compensate, and it does so strongly for document_id by explaining it accepts either a session slot id or a permanent UUID and where each comes from. include_html is already documented in the schema; only session_id is left without any explanation, though its meaning is largely inferable.

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+resource ('Make document_id the focused document') and clarifies the meaning of 'focused' as the editor's active document and default edit target. It is understandable in isolation, but it does not explicitly contrast itself with plausible siblings like open_documents or close_session_document, leaving the agent to infer when focus-switching is the right call.

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?

Useful operational guidance is embedded: it accepts either the session slot id or the durable UUID, and it names list_documents/Files and list_session_documents as the sources for those ids. However, there is no explicit when-to-use/when-not statement and no comparison against open_documents, so usage is implied rather than directed.

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.