site, then reads only the part of the page it needs with a fetch prompt.
What to send for each lookup
Each docs task maps to one tool call and one or two parameters:
The
site value covers subdomains, and a path narrows it further, so github.com/pydantic/pydantic searches one repository. See Search request for the full site rules and Filter by domain for leaving hosts out.
Connect the MCP server
The Keenable CLI adds the server to every coding agent it finds among Claude Code, Cursor, Devin Desktop, Codex and OpenCode:--header "X-API-Key: keen_<your_key>" at the end of the command to lift the hourly cap. MCP server has the config for Codex, Cursor and other clients.
Tell the agent to check the docs
An agent that has the tools still answers from memory unless you tell it when to look. Add this block toAGENTS.md at the root of your repository. Codex and Cursor read AGENTS.md, and Codex also reads ~/.codex/AGENTS.md for every project:
AGENTS.md
AGENTS.md only when the repository has no CLAUDE.md. If it has one, add a line with @AGENTS.md to CLAUDE.md so Claude Code imports the block, or paste the block into CLAUDE.md. For every project on your machine, put the block in ~/.claude/CLAUDE.md.
If your agent also has a built-in web search, turn it off so the rule isn’t split between two tools. See Claude, Codex and Cursor.
Search one docs site, then read the answer
The agent makes the same two calls as this sample. The sample searches the current Pydantic docs, takes the top result, and fetches only the example it needs. It runs with no API key:Example output · results vary
max_chars cap, instead of the whole page. That keeps the agent’s context free for your code. See Fetch with a prompt for prompts that return parseable output.
Pin the docs version
Many docs sites keep a copy for every release. Ifsite names only the host, old versions can rank first. On 19 November 2026, a search for model_validator with site set to docs.pydantic.dev returned only pages under version paths such as /2.8/ in its top 3. With docs.pydantic.dev/latest, every result came from the current docs.
Common mistakes
Verify
Start a new session in your repository and ask the agent to change code that uses a library, such as “Add a model validator that checksend is after start.” The agent should call search_web_pages with site set to the docs host before it edits the file, and name the docs URL in its reply.
API reference
- MCP server tools: every
search_web_pagesandfetch_page_contentargument. - Search request:
siteandpublished_afterover HTTP. - Agent skill: search from a shell script when the agent has no MCP client.