Skip to main content
Glama

Read a document to change it

get_document
Read-only

Returns the current contents of a document on HTMLRadar so they can be changed and put back with replace_document. A change to a page already on HTMLRadar is made this way, for pages up to 30 MB, the same limit as the website: read the page here, then send the edited short form, or only the changes, to replace_document; a whole new file is needed only to replace the page itself. Each embedded PNG, JPEG, GIF and WebP image appears as a short htmlradar-image reference instead of its data; unchanged references restore the original images, and other embedded images, such as SVG, stay in the markup. Up to 5 MB of text and code, with its images as references, the whole page comes back. Between 5 MB and 20 MB it is too large to return whole: pass query, a word or phrase from the part to change, and it returns up to 20 passages where that text appears, exact text for edits. Over 20 MB of text and code besides its images, the page cannot be read or changed here. A document served from its own address has no stored contents to return. It reads only this account's documents and changes nothing.

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

Input Schema

NameRequiredDescriptionDefault
queryNoText to find, 1 to 200 characters, matched literally with letter case ignored, such as a product name or a price. Returns up to 20 passages around the matches, and how many there are, instead of the whole page. For a page too large to read whole, the passages provide exact text for edits.
document_idYesThe document to read: the document id from list_documents or list_shares.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

The description adds real behavioral detail beyond the annotations: size thresholds, the htmlradar-image reference substitution for PNG/JPEG/GIF/WebP (with SVG left inline), and the fact that it changes nothing. However, the 30 MB vs 5 MB vs 20 MB figures are presented in a tangled order, and the openWorldHint=true annotation sits in mild tension with the claim that it reads only this account's documents, which goes unaddressed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The key read-to-replace framing is front-loaded, but the paragraph is dense and rambling, with redundancy ("the same limit as the website") and a convoluted clause about a whole new file replacing "the page itself". The size thresholds would read far better as a short ordered list than as one long sentence.

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?

For a two-parameter read with no output schema, the description covers everything an agent needs to call it correctly: input source for the id, the size-dependent query behavior, image placeholder semantics, and the hard failure cases.

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 100% and the schema already documents both `query` and `document_id`, including matching behavior and result counts. The description's only addition is the size threshold that triggers `query` and the pointer to `edits`, which is useful but largely restates the schema's own wording.

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?

Opens with a specific verb and resource ("Returns the current contents of a document") and immediately frames the purpose as a read-before-write workflow tied to replace_document, which cleanly separates it from the sibling mutation tool.

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?

Routing is explicit and conditional: the page is read here and edited content sent to replace_document, `query` is required between 5 MB and 20 MB, `query` is not usable above 20 MB, and documents served from their own address return nothing. It also states the account-scope restriction, leaving little for the agent to infer.

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.