Skip to main content
Glama
KBB99

mcp-registry-server

by KBB99

retrieve_mcps

Search the MCP registry using natural language queries to find relevant MCP servers for your projects.

Instructions

Performs retrieval from our registry of MCPs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe query to perform retrieval on

Implementation Reference

  • index.ts:92-112 (handler)
    Handler logic for the 'retrieve_mcps' tool within the CallToolRequestSchema request handler. It extracts the query argument, calls the retrieveContext helper, and returns the RAG sources or error messages.
    if (name === "retrieve_mcps") {
      const { query } = args as Record<string, any>;
      try {
        const result = await retrieveContext(query);
        if (result.isRagWorking) {
          return {
            content: [
              { type: "text", text: `RAG Sources: ${JSON.stringify(result.ragSources)}` },
            ],
          };
        } else {
          return {
            content: [{ type: "text", text: "Retrieval failed or returned no results." }],
          };
        }
      } catch (error) {
        return {
          content: [{ type: "text", text: `Error occurred: ${error}` }],
        };
      }
    } else {
  • Tool definition including name, description, and input schema for 'retrieve_mcps'. This is used for tool listing and validation.
    const RETRIEVAL_TOOL: Tool = {
      name: "retrieve_mcps",
      description: "Performs retrieval from our registry of MCPs.",
      inputSchema: {
        type: "object",
        properties: {
          query: { type: "string", description: "The query to perform retrieval on" },
        },
        required: ["query"]
      },
    };
  • index.ts:85-87 (registration)
    Registration of the 'retrieve_mcps' tool in the ListToolsRequestSchema handler, making it discoverable by clients.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [RETRIEVAL_TOOL],
    }));
  • Helper function that performs the actual retrieval by calling a Lambda URL with the query and returns RAG sources.
    async function retrieveContext(
      query: string,
    ): Promise<{
      isRagWorking: boolean;
      ragSources: RAGSource[];
    }> {
      try {
        if (!query) {
          console.error("Query was not provided");
          return {
            isRagWorking: false,
            ragSources: [],
          };
        }
    
        const input = { queryStringParameters: {query: query}};
    
        // Call the Lambda URL with the input
        const response = await fetch("https://r3swscwlse4zxx5zqhm7vwij740xcooe.lambda-url.us-east-1.amazonaws.com/", {
          method: "POST",
          body: JSON.stringify(input),
          agent: httpsAgent,
        },
      ).then((res: { json: () => any; }) => res.json());
    
        const ragSources = response
        
        return {
          isRagWorking: true,
          ragSources,
        };
      } catch (error) {
        console.error("RAG Error:", error);
        return { isRagWorking: false, ragSources: [] };
      }
    }
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. It states 'Performs retrieval' but doesn't disclose behavioral traits like whether it's read-only, if it requires authentication, rate limits, or what the output format might be. This leaves significant gaps for an agent to understand how to use it effectively.

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 a single, efficient sentence with no wasted words. It's appropriately sized and front-loaded, clearly stating the tool's purpose without unnecessary details.

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 tool has no annotations, no output schema, and a simple input schema, the description is incomplete. It doesn't explain what 'MCPs' are, what the retrieval returns, or any behavioral context, making it insufficient for an agent to fully understand the tool's use.

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 'query' parameter documented as 'The query to perform retrieval on'. The description doesn't add any meaning beyond this, such as query syntax or examples. With high schema coverage, the baseline is 3, as the schema handles the parameter documentation adequately.

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

Purpose3/5

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

The description states the action ('Performs retrieval') and resource ('from our registry of MCPs'), which is clear but vague. It doesn't specify what type of retrieval (e.g., search, lookup, fetch) or what 'MCPs' refers to, and with no siblings, differentiation isn't needed but specificity is lacking.

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, such as context, prerequisites, or alternatives. With no sibling tools, it's implied this is the only retrieval option, but no explicit usage scenarios are mentioned.

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

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/KBB99/mcp-registry-server'

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