Tool definition
Define the search tool with a description, parameters, and expected output:Tool execution
When the agent calls the tool, execute the search and return results:Putting it together
Here’s how the tool fits into an agent loop:Using format=context for agents
For agents that pass search results directly into conversation context, format=context returns pre-formatted markdown:
Other agent frameworks
The same pattern works with any agent framework. See Build with AI agents for MCP server integration, which lets tools like Claude Code and Cursor access the docs directly.Next steps
Build with AI agents
MCP server, llms.txt, and markdown access.
RAG pipeline
Search as retrieval context for LLMs.
Query parameters
Full parameter reference.
Error handling
Error codes and retry strategies.

