| name | docpull-research |
| description | Use the docpull MCP tools (list_indexed, ensure_docs, grep_docs, read_doc, fetch_url) to ground answers in real web/source material when the user asks about a specific library, framework, API, vendor, product page, website, or public source URL. Activate on questions like "how do I X in [library]", "what's the API for [framework].[method]", "summarize this site/source", "show me what [vendor] says about Y", or when a user pastes a documentation/source URL. |
| allowed-tools | mcp__docpull__list_indexed, mcp__docpull__list_sources, mcp__docpull__ensure_docs, mcp__docpull__grep_docs, mcp__docpull__read_doc, mcp__docpull__fetch_url |
docpull research
Ground library/framework, API, vendor, product, and website answers in fetched source material instead of training-data recall. The cost of one grep_docs call is ~50 ms; the cost of giving a confidently wrong answer about a fast-moving source is much higher.
When to use this skill
Activate when the user's question names a specific library, framework, SDK, API surface, vendor, product page, or website - especially:
- Fast-moving libraries where training-data drift is likely: Next.js (App Router), Pydantic v2, LangChain, FastAPI, Anthropic SDK, OpenAI SDK, Drizzle, Prisma, Tailwind v4+, Vercel AI SDK.
- Version-specific questions ("how does X work in [library] v[N]").
- Pasted documentation, blog, vendor, product, or source URLs the user wants explained or referenced.
- Code the user is actively writing against a library, where wrong signatures will cost them debugging time.
Do NOT activate for:
- General programming questions ("what's a closure", "explain async/await").
- The user's own codebase — that's what Read/Grep are for.
- Highly stable, well-known stdlib APIs (Python
os, JavaScript Array.prototype).
- Clarifying questions where the answer is trivial from context.
Workflow
1. Check what's already cached
Always start with list_indexed. It's free and tells you which libraries you can search immediately without fetching.
list_indexed() → ["fastapi (3d ago)", "react (12h ago)", ...]
2. If the source/library is cached -> search it
Use grep_docs with a focused regex. The source is already on disk, so this is a local search:
grep_docs(library="fastapi", pattern="dependency injection", limit=10, context=2)
If you want more context around a hit, use read_doc(library, path, line_start, line_end).
3. If the source/library is NOT cached -> decide whether to fetch
- Built-in alias (the source appears in
list_sources()): call ensure_docs(source="<alias>"). This crawls and indexes the whole source. ~10-30s for typical sites.
- Pasted documentation or source URL: call
fetch_url(url=...) if you only need one static/server-rendered page. For a whole source site you don't have an alias for, tell the user to run /web-add <URL> (or the older /docs-add <URL> alias) so docpull can register and crawl it; the MCP fetch_url is single-page only.
- No alias, user didn't paste a URL: ask the user once whether they'd like to add the source, and what URL should be used. Don't fetch speculatively.
4. Quote with attribution
When you cite fetched content, include the source path returned by grep_docs / read_doc so the user can verify. Example: "Per fastapi/tutorial/dependencies.md:42, dependencies declared with Depends() are resolved per-request..."
5. Don't over-fetch
- Don't call
ensure_docs for libraries the user didn't ask about ("while we're here, let me also fetch...").
- Don't crawl the same source twice in one session -
list_indexed will tell you it's there.
- If
grep_docs returns nothing useful, broaden the regex once before suggesting the user add more source material.
Built-in aliases
These are pre-configured and resolvable by ensure_docs(source=...) without setup: react, nextjs, tailwindcss, vite, hono, fastapi, express, anthropic, openai, langchain, supabase, drizzle, prisma. Run list_sources() for the current set.
Failure modes
ensure_docs returns "unknown source": the alias isn't built-in. Either suggest /web-add <URL> or call list_sources() and propose a near match.
grep_docs returns empty: the pattern is too narrow, or the fetched source doesn't cover the topic. Broaden once, then surface the gap to the user.
- MCP server not responding: tell the user to run
pip install 'docpull[mcp]' and verify the plugin's MCP server is healthy. Fall back to answering from training data with an explicit caveat that fetched sources weren't available.
Tone
When you've grounded an answer in fetched source material, say so once at the start of the answer ("Per the FastAPI docs..." or "Per the cached source..."). Don't pad every paragraph with attribution - one source citation up front plus inline file references is enough.