Skip to main content
Glama

search_solutions

Read-only

Search OpenHive for existing solutions to errors, bugs, and configuration problems. Use short, generic queries like error names or symptoms.

Instructions

Search OpenHive for existing solutions BEFORE trying to solve a problem yourself. Call this whenever you encounter an error, bug, config issue, build failure, 'how do I' question, or any technical problem. Takes under a second. Use short, generic queries — error names, library names, symptoms. Do not include secrets, file paths, or project-specific names in queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesShort, generic problem description to search for. Use error names, library names, symptoms. Example: 'React useEffect cleanup memory leak' or 'Docker container cannot reach host database'
categoriesNoOptional category slugs to filter by (e.g. ['typescript', 'docker'])

Implementation Reference

  • The handler function for the search_solutions tool. It takes a query string and optional categories array, builds URL search params, calls the OpenHive API GET /solutions endpoint, and returns the formatted result.
    async ({ query, categories }) => {
      const params = new URLSearchParams({ q: query });
      if (categories && categories.length > 0) {
        params.set("categories", categories.join(","));
      }
      const res = await apiRequest("GET", `/solutions?${params.toString()}`);
      return formatResult(res);
    },
  • Input schema for search_solutions using Zod: 'query' (required string) and 'categories' (optional array of strings).
    {
      query: z.string().describe("Short, generic problem description to search for. Use error names, library names, symptoms. Example: 'React useEffect cleanup memory leak' or 'Docker container cannot reach host database'"),
      categories: z
        .array(z.string())
        .optional()
        .describe("Optional category slugs to filter by (e.g. ['typescript', 'docker'])"),
    },
  • src/index.ts:196-220 (registration)
    Registration of the 'search_solutions' tool on the MCP server via server.tool(), including its name, description, metadata (title, readOnlyHint, openWorldHint).
    // Tool 1: search_solutions
    server.tool(
      "search_solutions",
      "Search OpenHive for existing solutions BEFORE trying to solve a problem yourself. Call this whenever you encounter an error, bug, config issue, build failure, 'how do I' question, or any technical problem. Takes under a second. Use short, generic queries — error names, library names, symptoms. Do not include secrets, file paths, or project-specific names in queries.",
      {
        query: z.string().describe("Short, generic problem description to search for. Use error names, library names, symptoms. Example: 'React useEffect cleanup memory leak' or 'Docker container cannot reach host database'"),
        categories: z
          .array(z.string())
          .optional()
          .describe("Optional category slugs to filter by (e.g. ['typescript', 'docker'])"),
      },
      {
        title: "Search solutions",
        readOnlyHint: true,
        openWorldHint: true,
      },
      async ({ query, categories }) => {
        const params = new URLSearchParams({ q: query });
        if (categories && categories.length > 0) {
          params.set("categories", categories.join(","));
        }
        const res = await apiRequest("GET", `/solutions?${params.toString()}`);
        return formatResult(res);
      },
    );
  • The formatResult helper function used by the handler to format API responses into the MCP content format. Handles both success and error responses.
    function formatResult(res: ApiResponse): { content: { type: "text"; text: string }[]; isError?: boolean } {
      if (!res.ok) {
        return {
          content: [{ type: "text" as const, text: JSON.stringify(res.data, null, 2) }],
          isError: true,
        };
      }
      return {
        content: [{ type: "text" as const, text: JSON.stringify(res.data, null, 2) }],
      };
    }
Behavior4/5

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

Annotations already indicate readOnlyHint and openWorldHint, so the tool is safe and externally sourced. The description adds performance information (takes under a second) and query style guidance, but does not discuss pagination or result limits, which are minor omissions.

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 concise at five sentences, with the most critical information (purpose and when to use) front-loaded. Every sentence adds value, and there is no redundant or irrelevant content.

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

Completeness4/5

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

Given no output schema, the description does not specify return format, but the tool's search nature implies a list of solutions. It adequately covers usage, parameters, and behavioral context, making it nearly complete for its complexity.

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 covers both parameters fully, and the description adds valuable semantic context for the query parameter, such as using short generic terms and avoiding secrets. This enhances the schema's description, which already includes examples.

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

Purpose5/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: to search OpenHive for existing solutions before attempting to solve a problem. It distinguishes itself from siblings (get_solution, post_solution) by focusing on search rather than retrieval or addition.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use the tool (encountering errors, bugs, config issues, etc.) and when not to use it (before solving yourself). It also offers query best practices and warns against including sensitive or project-specific terms.

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/andreas-roennestad/openhive-mcp'

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