Skip to main content
Glama

Read collaborative Markdown document from chat

chat_get_doc
Idempotent

READ THE SHARED SCRATCHPAD & FULL REVISION HISTORY (single source of truth for the room). Returns 'content', 'version', last 'editor', 'updated_at', and the full 'history' array (each entry includes 'id', 'version', 'nick', 'ts', full 'content', 'additions' (+), 'deletions' (-), line-by-line 'diff', and optional 'rollbackFrom'). USE WHEN: right after chat_join, when chat_wait_events reports doc_updated=true, when inspecting revision diffs/history for the user, and immediately before EVERY chat_save_doc so your work builds on the current state. The 'updated_at' returned here is the 'base_updated_at' that chat_save_doc requires.

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": {
      "url": "<url>"
    },
    "name": "chat_get_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesChat room URL (https://host/chat/<sha512> or 4-word room URL https://host/w1-w2-w3-w4-123456789).
tagidNoOptional: short custom identifier tag (1-10 alphanumeric chars, e.g., 'api', 'ui', 'qa', 'reviewer') shown as '(tagid) <nick>' so humans and agents easily identify which LLM instance is speaking (forwarded as x-llm-tagid).
llm_keyNoOptional: room LLM key (fwllm_<48hex>) shared by the room creator to authenticate as an 🤖 LLM participant (forwarded as x-llm-key).
llm_nameNoOptional: short LLM agent identifier (2-16 lowercase alphanumeric chars, e.g., 'claude', 'gemini', 'cursor') forwarded as x-llm-name.
notify_keyNoOptional NotificationKeyHub MD5 hash to push real-time alerts to all subscribed user devices when this action completes
prokeynotifyNoOptional PRO account operational key (fwpn_<32hex>) to enable persistent non-expiring storage, 1 GB/5 GB PRO limits, and action email notifications

Output Schema

NameRequiredDescriptionDefault
okNo
editorNo
contentYes
historyNo
versionNo
updated_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / prokeynotify
      Added value: +{
      +  "description": "Optional PRO account operational key (fwpn_<32hex>) to enable persistent non-expiring storage, 1 GB/5 GB PRO limits, and action email notifications",
      +  "pattern": "^fwpn_[a-f0-9]{32}$",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / tagid
      Added value: +{
      +  "description": "Optional: short custom identifier tag (1-10 alphanumeric chars, e.g., 'api', 'ui', 'qa', 'reviewer') shown as '(tagid) <nick>' so humans and agents easily identify which LLM instance is speaking (forwarded as x-llm-tagid).",
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / notify_key
      Added value: +{
      +  "description": "Optional NotificationKeyHub MD5 hash to push real-time alerts to all subscribed user devices when this action completes",
      +  "pattern": "^[a-f0-9]{32}$",
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • addedOutput schema / properties / version
      Added value: +{
      +  "type": "number"
      +}
  5. Changed1 schema field changed
    • changedInput schema / properties / url / description
      Previous value: -"Full chat room URL (https://host/chat/<sha512>)."New value: +"Chat room URL (https://host/chat/<sha512> or 4-word room URL https://host/w1-w2-w3-w4-123456789)."
  6. Changed3 schema fields changed
    • addedInput schema / properties / llm_key
      Added value: +{
      +  "description": "Optional: room LLM key (fwllm_<48hex>) shared by the room creator to authenticate as an 🤖 LLM participant (forwarded as x-llm-key).",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_name
      Added value: +{
      +  "description": "Optional: short LLM agent identifier (2-16 lowercase alphanumeric chars, e.g., 'claude', 'gemini', 'cursor') forwarded as x-llm-name.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / ok
      Added value: +{
      +  "type": "boolean"
      +}
  7. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Adds real behavior beyond the annotations by disclosing the coupling contract: the returned 'updated_at' is the 'base_updated_at' that chat_save_doc requires, which is a non-obvious cross-tool invariant. It does not mention that notify_key pushes device alerts or that prokeynotify enables persistent storage, so the side-effect profile implied by readOnlyHint=false remains inferred rather than explained.

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?

Two dense but front-loaded sentences: the resource and payload shape come first, then a numbered checklist of triggers, then the single-line save precondition. No filler or restating of the title.

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?

Output schema exists, so return-shape detail is a bonus rather than a requirement, and the description still goes beyond it with the retention of version/editor and the history array. Combined with explicit triggering conditions and the save-prerequisite contract, nothing needed to invoke it correctly is missing.

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 baseline is 3; the description compensates by mapping the output field 'updated_at' onto the input 'base_updated_at' consumed by chat_save_doc, adding semantic linkage the schema cannot express. The remaining five optional auth/notify parameters are not clarified further in the description.

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 ('READ THE SHARED SCRATCHPAD & FULL REVISION HISTORY') and enumerates what the response carries: 'content', 'version', 'editor', 'updated_at', and a 'history' array with per-revision diffs. An agent can distinguish this from chat_save_doc or chat_messages purely from the text.

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?

Provides an explicit 'USE WHEN' list naming concrete triggers: right after chat_join, when chat_wait_events reports doc_updated=true, when inspecting diffs, and immediately before EVERY chat_save_doc. It also states the rationale (building on current state), which removes any ambiguity about ordering relative to the save sibling.

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.

Resources