search_documentation
Find relevant documentation sections by querying the ATprotocol database. This tool retrieves semantically similar chunks to help developers quickly access accurate information.
Instructions
Search the documentation for the given query.
This tool can be used to answer questions about documentation. Results are limited and returned as semantically similar chunks to the query.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Implementation Reference
- src/tools/docs.ts:18-25 (handler)The asynchronous handler function that performs the actual logic of the 'search_documentation' tool. It uses an AI autorag service to search documentation based on the input query and returns the response as text content.async ({ query }) => { const results = await agent.env.AI.autorag("atproto-docs-rag").aiSearch({ query: query, }) return { content: [{ type: 'text', text: results.response }], }; }
- src/tools/docs.ts:17-17 (schema)The input schema definition for the 'search_documentation' tool, specifying a required 'query' string parameter validated with Zod.{ query: z.string() },
- src/tools/docs.ts:12-26 (registration)The registration of the 'search_documentation' tool on the MCP server agent, including name, description, schema, and handler.agent.server.tool( "search_documentation", `Search the documentation for the given query. This tool can be used to answer questions about documentation. Results are limited and returned as semantically similar chunks to the query.`, { query: z.string() }, async ({ query }) => { const results = await agent.env.AI.autorag("atproto-docs-rag").aiSearch({ query: query, }) return { content: [{ type: 'text', text: results.response }], }; } )