Skip to main content
Glama

add_documentation

Crawl a framework or library documentation site and index it for semantic search, with incremental re-ingestion that skips unchanged pages.

Instructions

Crawl a framework/library documentation site and index it for semantic search.

Re-ingesting an existing source is incremental: pages whose extracted markdown is unchanged are skipped (no re-embedding).

Args: name: Short identifier for the framework, e.g. "react". version: Version string, e.g. "18.3" or "latest". base_url: Entry point URL of the documentation site. max_depth: How many link hops to follow from base_url. max_pages: Hard cap on the number of pages crawled. background: If true, start the crawl and return a job id immediately; track it with get_ingest_status. Large sites should use this to avoid tool timeouts. prune_missing: If true, delete indexed pages that this crawl did not visit. Only enable when depth/page caps cover the whole site, otherwise capped crawls would delete valid pages. lang: ISO 639-1 language code to filter pages (e.g. "en"). Only pages matching this language are crawled. sitemap: If true, discover pages from sitemap.xml instead of following links. Gives better coverage for docs sites that expose a sitemap.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNo
nameYes
sitemapNo
versionYes
base_urlYes
max_depthNo
max_pagesNo
backgroundNo
prune_missingNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so well. It discloses incremental re-ingestion behavior (skipping unchanged pages), the destructive risk of prune_missing with a condition to avoid data loss, the asynchronous nature of background mode, and that a job id is returned for tracking.

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 description is well-structured with a brief overview followed by an Args list. It is appropriately sized for 9 parameters, though the overview could be slightly more front-loaded with the core action before the incremental note, but it remains clear and not verbose.

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?

Given the tool's complexity (9 parameters, no annotations, existing output schema), the description is complete. It covers purpose, parameter semantics, behavioral traits like incremental updates and async background jobs, and risk warnings for prune_missing, leaving no critical gaps for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning the schema provides no parameter descriptions, so the description must compensate and does. It defines each of the 9 parameters with examples, defaults, and effects (e.g., max_depth as link hops, background as starting an async job, prune_missing as deleting indexed pages not visited).

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?

The description states a specific verb and resource: 'Crawl a framework/library documentation site and index it for semantic search.' This clearly distinguishes it from sibling tools like add_local_docs (local files) and search_documentation (queries the index), and it names the outcome (semantic search index).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explains when to use background mode for large sites to avoid timeouts, and warns to only enable prune_missing when depth/page caps cover the whole site. However, it does not explicitly contrast with add_local_docs or search_documentation, leaving sibling selection to inference.

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