Skip to main content
Glama
mxchris18
by mxchris18

crawl_site

Crawl a website, chunk all pages, and return structured JSON chunks. Supports sitemap (for docs/blogs) and spider (follows links) modes.

Instructions

Crawl an entire website, chunk all pages, and return structured JSON chunks. Two modes: 'sitemap' (reads sitemap.xml — best for docs/blogs) and 'spider' (follows links — works on any site).

Use this when the user wants chunks from MULTIPLE pages WITHOUT extracting structured fields. For structured field extraction across pages, use extract_crawl.

⚠️ ALWAYS confirm the max_pages limit with the user before calling. Default is 10 pages. For large sites, warn about credit usage first.

If contextual_retrieval is requested, follow the PRE-FLIGHT sequence:

  1. Call verify_provider_key(provider, 'llm') → get live model list

  2. Ask user to choose a model

  3. Ask about JS rendering

  4. Present Contextual Retrieval as a recommended upgrade

LLM keys can be omitted if set as environment variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe root domain or sitemap URL to crawl.
selectorNoOptional CSS selector applied to every crawled page.
js_renderNoUse headless browser to render JS before scraping each page. Ask the user before enabling. Adds surcharge per page.
llm_modelNoLLM model name from verify_provider_key. Do not guess or hardcode.
max_pagesNoMaximum pages to crawl. Default: 10. Maximum: 200. Always confirm with user for large sites.
crawl_modeNo'sitemap': reads sitemap.xml (best for docs/blogs). 'spider': follows links from root URL (works on any site).sitemap
llm_api_keyNoAPI key for the LLM provider. Can be omitted if set as env var.
llm_providerNoLLM provider for contextual retrieval. Verify with verify_provider_key first.
exclude_patternNoSkip URLs containing this substring (e.g. '/blog/').
include_patternNoOnly crawl URLs containing this substring (e.g. '/docs/').
contextual_retrievalNoEnable RAG 2.0 contextual enrichment. Present as a recommended upgrade. Requires llm_provider and llm_model from verify_provider_key.
Behavior4/5

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

Despite no annotations, the description discloses behavioral traits like two modes, default max_pages, credit usage warning, surcharge for js_render, and pre-flight requirements. Could mention non-destructive nature, but overall strong.

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 sections, bullet points, and front-loaded purpose. Slightly lengthy but every part earns its place.

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?

Given 11 parameters, no output schema, and no annotations, the description covers the tool's behavior, parameters, and workflow comprehensively. Lacks detail on output format but still strong.

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 adds context beyond the schema, e.g., explaining crawl_mode types, surcharge for js_render, and the pre-flight sequence for contextual_retrieval. Adds value.

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 clearly states the tool's purpose: 'Crawl an entire website, chunk all pages, and return structured JSON chunks.' It distinguishes two modes and contrasts with extract_crawl for structured field extraction.

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 guidance is given: use when user wants chunks from multiple pages without structured extraction; use extract_crawl for structured extraction. Includes a pre-flight sequence for contextual_retrieval and warns about confirming max_pages.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mxchris18/scrapedatshi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server