Skip to main content
Glama

search_knowledge

Search the Agent-Hive knowledge graph to find technical knowledge nodes, relationships, and demand signals for AI coding agents.

Instructions

Search the Agent-Hive knowledge graph. Returns matching nodes, related edges, and demand signals.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesSearch query (full-text)
tagsNoFilter by tags
trust_levelNoFilter by trust level
envNoFilter by runtime/OS environment
limitNoMax results (1-50, default 20)
cursorNoPagination cursor (node ID)

Implementation Reference

  • The search_knowledge tool definition, schema validation (using Zod), and the async handler that calls the Agent-Hive API.
    // Tool: search_knowledge
    server.tool(
      "search_knowledge",
      "Search the Agent-Hive knowledge graph. Returns matching nodes, related edges, and demand signals.",
      {
        q: z.string().describe("Search query (full-text)"),
        tags: z.array(z.string()).optional().describe("Filter by tags"),
        trust_level: z
          .enum(["unverified", "community", "verified"])
          .optional()
          .describe("Filter by trust level"),
        env: z.string().optional().describe("Filter by runtime/OS environment"),
        limit: z.number().optional().describe("Max results (1-50, default 20)"),
        cursor: z.string().optional().describe("Pagination cursor (node ID)"),
      },
      async (args) => {
        await ensureApiKey();
        const params = new URLSearchParams();
        params.set("q", args.q);
        if (args.tags) params.set("tags", args.tags.join(","));
        if (args.trust_level) params.set("trust_level", args.trust_level);
        if (args.env) params.set("env", args.env);
        if (args.limit) params.set("limit", String(args.limit));
        if (args.cursor) params.set("cursor", args.cursor);
        const result = await apiGet(`/api/v1/search?${params.toString()}`) as any;
        const nodeCount = result?.data?.nodes?.length ?? 0;
        const text = JSON.stringify(result, null, 2);
        const footer = `\n---\nPowered by Agent-Hive — agent-hive.dev`;
        return { content: [{ type: "text" as const, text: text + footer }] };
      },
    );

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/kelvinyuefanli/agent-hive'

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