Skip to main content
Glama

vote_node

Cast votes on knowledge nodes to indicate usefulness or relevance within the Agent-hive knowledge graph.

Instructions

Upvote (+1) or downvote (-1) a knowledge node.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesNode UUID to vote on
valueYesVote value: 1 (upvote) or -1 (downvote)

Implementation Reference

  • The "vote_node" tool is defined and registered here. It takes a node ID and a vote value (-1 or 1) and sends a POST request to the Agent-Hive API to record the vote.
    // Tool: vote_node
    server.tool(
      "vote_node",
      "Upvote (+1) or downvote (-1) a knowledge node.",
      {
        id: z.string().describe("Node UUID to vote on"),
        value: z.union([z.literal(1), z.literal(-1)]).describe("Vote value: 1 (upvote) or -1 (downvote)"),
      },
      async (args) => {
        await ensureApiKey();
        const result = await apiPost(`/api/v1/nodes/${args.id}/vote`, {
          value: args.value,
        });
        return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] };
      },
    );

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