Skip to main content
Glama

doc.save

Captures a page as a searchable document by scrolling to load lazy content, extracting it as Markdown, and indexing the full text so you can answer from saved docs instead of re-fetching.

Instructions

Capture a page as a saved document: scroll it until the lazy content has actually loaded, extract it as Markdown, store the full text as an artifact and index it for search. This is the tool for "read these docs" - save once, then answer from doc.search instead of re-fetching. Passing url navigates there first and returns immediately if that URL is already saved (refresh:true re-captures).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "doc.save"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoNavigate here first. Omit to capture the page already open.
findNoRecord regex / text / selector hits against this page.
labelNoFree-text tag for this capture.
formatNoDefault "markdown": keeps headings, code fences, tables and link targets, which is what makes a saved API reference still readable. "text" is flat visible text.
scrollNoDefault true: sweep the page until scrollHeight stops growing, so lazy-loaded and reveal-on-scroll sections are actually in the DOM before extraction. Turn off only for a page you know renders in full immediately.
refreshNoRe-capture even if this URL is already saved. Updates in place, keeping the same doc_id.
selectorNoCapture only this element instead of letting main_only pick one.
main_onlyNoDefault true: capture the <main>/<article> content and drop nav, sidebar and footer. Set false if the page has no content landmark and comes back short.
max_linksNoCap on links collected per page (default 500).
settle_msNoExtra wait after scrolling, before extracting.
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
click_moreNoAlso click "Load more" / "Show all" buttons between sweeps. Off by default because it is a real interaction, not just a scroll.
collectionNoGroup this with related pages, e.g. "nextjs-docs". Filter and search by it later.
timeout_msNo
wait_untilNo
preview_charsNoHow much of the text to echo back (default 600, 0 for none).
scroll_passesNoCap on sweeps (default 12, max 60). Raise for a long infinite-scroll list.
scroll_pause_msNoWait after each sweep for content to load (default 250).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false and openWorldHint=true; the description adds substantial behavior beyond that — lazy content is scrolled until loaded, output is stored as an artifact and indexed, already-saved URLs short-circuit, and refresh updates in place preserving doc_id. It also flags click_more as a real interaction rather than just a scroll, which is exactly the kind of side-effect disclosure annotations don't carry.

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?

Three front-loaded sentences: what it does, how to route to it versus doc.search, then the url/refresh edge case last. No redundant restatement of the tool name or title, and every clause carries operational 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?

For a 19-parameter, mutation-and-storage tool with no output schema, the description covers the essential mental model (artifact + search index + dedupe) and hints at what comes back via preview_chars. It stops short of describing the returned document shape or how scroll/settle timing failures surface, but nothing an agent needs to make a correct first call 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 already 89%, so the baseline is 3; the description improves on it by explaining url navigation and the early-return behavior and by spelling out refresh's in-place update and doc_id retention. It adds no meaning for wait_until or timeout_ms, which remain schema-only, so it falls short of full compensation.

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 concrete verb and resource — capture a page, scroll it, extract as Markdown, store as an artifact and index it — and names the sibling it is not for by telling the agent to answer from doc.search instead of re-fetching. The agent can distinguish doc.save from doc.get/doc.search without opening a schema.

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?

Gives an explicit when-to-use frame ("read these docs"), an explicit alternative (doc.search after saving), and states the url/refresh decision rule: passing url navigates and returns immediately if already saved, refresh:true re-captures. Exclusions are stated rather than implied.

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

Deploy Server

Other Tools