Skip to main content
Glama

Fetch & Index URL(s)

ctx_fetch_and_index

Fetch URL content, convert to markdown, index into searchable knowledge base, and return a preview. Parallel batch fetching enables multi-URL research.

Instructions

Fetches URL content, converts HTML to markdown, indexes into searchable knowledge base, and returns a ~3KB preview. Full content stays in sandbox — use ctx_search() for deeper lookups.

Better than WebFetch: preview is immediate, full content is searchable, raw HTML never enters context.

Content-type aware: HTML is converted to markdown, JSON is chunked by key paths, plain text is indexed directly.

PARALLELIZE I/O: For multi-URL research (library evaluation, migration scans, doc comparisons), pass requests: [{url, source}, ...] with concurrency: 4-8 — speeds up by 3-5x on real workloads. ✅ Use concurrency: 4-8 for: library docs sweep, multi-changelog scan, competitive pricing pages, multi-region docs, GitHub raw file pulls. ❌ Single URL → use the legacy {url, source} shape (concurrency irrelevant). Example: requests: [{url: 'https://react.dev/...', source: 'react'}, {url: 'https://vuejs.org/...', source: 'vue'}], concurrency: 5. Fetches parallelize up to your concurrency setting; FTS5 indexing serializes the writes after (SQLite single-writer rule).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoSingle URL to fetch and index (legacy single-shape)
sourceNoLabel for the indexed content when using single `url` (e.g., 'React useEffect docs', 'Supabase Auth API'). For batch, put source in each requests entry.
requestsNoBatch shape: array of {url, source?} entries. Use with concurrency>1 for parallel fetch. Each request indexed under its own source label. Output preserves input order.
concurrencyNoMax URLs to fetch in parallel (1-8, default: 1). Use 4-8 for I/O-bound multi-URL batches (library docs, changelogs, pricing pages). Capped by os.cpus().length on small machines (response notes when capped). Indexing is always serial regardless — only fetches race.
forceNoSkip cache and re-fetch even if content was recently indexed
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses that content stays in sandbox, indexing serializes, content-type awareness, caching via force, and concurrency limitations. It does not detail auth or rate limits, but overall behavioral traits are well covered.

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 detailed and well-structured with bullet points and sections. Every sentence adds value, though it is slightly lengthy. It could be more concise but remains clear and organized.

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?

With 5 parameters, no output schema, and no annotations, the description covers behavior comprehensively: fetching, indexing, concurrency, caching, content-type handling. It is missing output format details beyond the preview size, but overall it is very complete.

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 coverage is 100%. The description adds significant meaning: explains legacy vs batch request shapes, concurrency best practices, force parameter effect, and source labeling. It goes well beyond the schema descriptions.

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 specifies that the tool fetches URLs, converts HTML to markdown, indexes content, and returns a preview. It distinguishes from WebFetch and content-type awareness, and the title and name align with the function.

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?

The description provides explicit when-to-use scenarios (e.g., multi-URL research) and when-not-to (single URL uses legacy shape). It gives concurrency guidelines and a comparison with WebFetch, but does not explicitly mention alternatives among sibling tools.

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/mksglu/context-mode'

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