Skip to main content
Glama

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
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • 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 }],
             };
         }
  • The input schema definition for the 'search_documentation' tool, specifying a required 'query' string parameter validated with Zod.
    { query: z.string() },
  • 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 }],
             };
         }
     )
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: 'Results are limited and returned as semantically similar chunks to the query.' This adds useful context about result limitations and format. However, it doesn't cover other important aspects like error handling, authentication needs, or rate limits, leaving gaps for a tool with no annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, and the second adds necessary context. Every sentence earns its place with no wasted words, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (1 parameter, no output schema, no annotations), the description is somewhat complete but has gaps. It explains the purpose and result format but lacks details on error cases, authentication, or output structure. Without an output schema, more information on return values would be helpful, though the description does mention result limitations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It explains that the 'query' parameter is used to 'search the documentation' and 'answer questions about documentation,' providing clear semantic meaning beyond the schema. This adequately covers the single parameter, though it doesn't detail query syntax or examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search the documentation for the given query.' This specifies the verb ('search') and resource ('documentation'), making it easy to understand what the tool does. However, with no sibling tools mentioned, there's no opportunity to distinguish from alternatives, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some usage context: 'This tool can be used to answer questions about documentation.' This implies when to use it, but it doesn't offer explicit guidance on when not to use it or mention any alternatives. With no sibling tools, the guidance is adequate but not comprehensive.

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

Related 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/immber/mcp-atproto-docs'

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