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 }] };
      },
    );
Behavior2/5

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

With no annotations provided, the description carries full burden but lacks critical behavioral details. It doesn't disclose whether this is a read-only operation, potential rate limits, authentication requirements, or how results are structured. The mention of 'demand signals' is vague without explanation of what these represent or how they're used.

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

Conciseness4/5

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

The description is efficiently structured in a single sentence that states the action, target, and return values. There's no wasted verbiage, though it could be slightly more front-loaded by mentioning the search capability first rather than embedding it in the middle of the sentence.

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?

For a search tool with 6 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain result formats, pagination behavior beyond the cursor parameter, error conditions, or how the knowledge graph is structured. The mention of 'demand signals' is particularly opaque without definition.

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?

Schema description coverage is 100%, so the schema fully documents all 6 parameters. The description adds no parameter-specific information beyond what's already in the schema descriptions, meeting the baseline for high coverage but not providing additional semantic context about how parameters interact or affect results.

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 action ('Search') and target resource ('Agent-Hive knowledge graph'), and specifies what is returned ('matching nodes, related edges, and demand signals'). It distinguishes from siblings like 'get_node' by emphasizing search functionality rather than direct retrieval, though it doesn't explicitly contrast with all alternatives.

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 like 'get_node' for direct lookup or 'get_briefing' for summaries. It mentions what the tool returns but gives no context about appropriate search scenarios or limitations compared to sibling tools.

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

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