Skip to main content
Glama
dreyfus92

Astro Docs MCP Server

search_docs

Search Astro documentation to find relevant information for Astro-related tasks. This tool enables AI assistants to retrieve specific content from the Astro docs for accurate user support.

Instructions

Search Astro documentation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term to find in Astro documentation

Implementation Reference

  • Handler for the 'search_docs' tool within the CallToolRequestSchema request handler. It extracts the query, calls searchDocs helper, and returns formatted search results or no results message.
    case "search_docs": {
      const args = request.params.arguments || {};
      const query = args.query ? String(args.query) : "";
      if (!query) {
        throw new Error("Search query is required");
      }
    
      const results = searchDocs(query);
      
      if (results.length === 0) {
        return {
          content: [{
            type: "text",
            text: `No documentation found for query: "${query}"`
          }]
        };
      }
    
      return {
        content: [
          {
            type: "text",
            text: `Found ${results.length} documentation sections for "${query}":\n\n` +
              results.map(section => 
                `- ${section.title}: ${section.content.substring(0, 100)}... (URI: astro-docs:///${section.id})`
              ).join('\n\n')
          }
        ]
      };
    }
  • Input schema definition for the 'search_docs' tool, specifying a required 'query' string parameter.
    inputSchema: {
      type: "object",
      properties: {
        query: {
          type: "string",
          description: "Search term to find in Astro documentation"
        }
      },
      required: ["query"]
    }
  • src/index.ts:640-659 (registration)
    Registration of the 'search_docs' tool via the ListToolsRequestSchema handler, which lists available tools including name, description, and schema.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: "search_docs",
            description: "Search Astro documentation",
            inputSchema: {
              type: "object",
              properties: {
                query: {
                  type: "string",
                  description: "Search term to find in Astro documentation"
                }
              },
              required: ["query"]
            }
          }
        ]
      };
    });
  • Helper function that performs the actual search over astroDocsSections by filtering sections matching the query in title, content, or category.
      query = query.toLowerCase();
      return Object.values(astroDocsSections).filter(section => {
        return section.title.toLowerCase().includes(query) || 
               section.content.toLowerCase().includes(query) ||
               section.category.toLowerCase().includes(query);
      });
    }
Behavior2/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 of behavioral disclosure. It states the action but reveals nothing about how the search works (e.g., scope, ranking, pagination), what the output looks like, or any constraints like rate limits or authentication needs. This leaves significant gaps for a tool with undocumented behavior.

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 extremely concise at just three words, front-loading the essential action and resource without any wasted text. Every word earns its place, making it efficient and straightforward for an agent to parse.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a search tool. It doesn't explain what the search returns, how results are structured, or any behavioral nuances, leaving the agent with insufficient context to use the tool effectively beyond the basic parameter.

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

Parameters3/5

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

The input schema has 100% description coverage, with the single parameter 'query' clearly documented as 'Search term to find in Astro documentation'. The description adds no additional parameter details beyond what the schema provides, so it meets the baseline for high schema coverage without compensating value.

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 with a specific verb ('Search') and resource ('Astro documentation'), making it immediately understandable. However, with no sibling tools mentioned, there's no opportunity to demonstrate differentiation from alternatives, which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or contextual limitations. While the absence of sibling tools reduces the need for differentiation, it still lacks any usage instructions or exclusions, leaving the agent with minimal operational context.

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/dreyfus92/astro-docs-mcp'

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