Skip to main content
Glama

Read a doc's HTML

get_doc_html
Read-only

Read the current HTML body of any docfarm HTML doc the user has access to — their own docs OR docs other people have shared with them (as collaborator or via share link). Returns title, share URL, the caller's role (owner / collaborator / reader), and the full HTML. ESSENTIAL precursor to patch_doc: call this first whenever the user asks for any change to a doc you don't have in context, so you can see what's there and construct accurate before/after snippets. Pass doc_name (easiest, fuzzy-matched) or slug. Embedded base64 images are stripped to placeholders by default (huge docs become readable in one call), so hosting a stripped copy back would drop those images from the doc; edit via patch_doc, or re-fetch with strip_data_uris: false for the byte-exact original. Large docs page via offset/max_chars — the response tells you the offset for the next slice.

Input Schema

NameRequiredDescriptionDefault
slugNoShare-link slug or full URL. Alternative to doc_name.
offsetNoCharacter offset to start reading from (default 0). Use the value from the previous response's continuation note.
accountNoEmail address of the farm to act on. Omit for the signed-in farm. Only a connected account is accepted; call list_accounts to see which.
doc_nameNoDoc name. Fuzzy-matched against the caller's own docs first, then docs they collaborate on.
max_charsNoMax characters to return per call (default 200000, max 500000).
strip_data_urisNoDefault true: base64 data URIs ≥1KB are replaced with short placeholders so content isn't crowded out by embedded images. Pass false for the byte-exact original.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/non-destructive, but the description adds substantial behavior beyond them: the exact return fields, the default base64-image stripping and its consequence ('hosting a stripped copy back would drop those images'), and offset/max_chars paging with a continuation offset. That is rich, non-redundant context.

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?

Front-loaded with purpose and the patch_doc precursor relationship, and every sentence carries useful content. It is dense and somewhat long, but no sentence is filler, so it stays just short of maximal conciseness.

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?

With no output schema, the description must carry the return contract, and it does (title, share URL, role, HTML, paging continuation). Combined with the stripping caveat and account handling, an agent has everything needed to invoke it correctly.

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 the baseline is 3, but the description adds meaning the schema does not: that a stripped copy re-hosted would lose images (justifying strip_data_uris: false), and that offset comes from the previous response's continuation note. doc_name fuzzy-matching is largely a restatement of the schema.

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 and resource ('Read the current HTML body') and immediately scopes it ('their own docs OR docs other people have shared with them'). It also names the return payload (title, share URL, role, full HTML), letting an agent distinguish it from siblings like app_read_doc without opening schemas.

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?

Explicit routing: 'ESSENTIAL precursor to patch_doc: call this first whenever the user asks for any change to a doc you don't have in context.' It also gives selection guidance for doc_name vs slug and for the strip_data_uris branching, so when-to-use is fully covered.

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