Skip to main content
Glama

get_poll

Retrieve poll metadata and time slot options with their IDs. Get title, status, deadline, location, and all available slots. Use the returned optionId values to vote or finalize the poll.

Instructions

Get poll metadata and time slot options (but NOT votes). Returns title, status, deadline, location, and all available time slots with their option IDs. Use this to retrieve optionId values needed for vote_on_poll or finalize_poll. To see who voted, use get_results instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pollIdYesPoll UUID

Implementation Reference

  • src/index.ts:61-75 (registration)
    Registers the 'get_poll' tool with the MCP server using server.tool(), defining the schema with a pollId string parameter and delegating to handleToolCall('get_poll', ...).
    server.tool(
      "get_poll",
      TOOL_DESCRIPTIONS.get_poll,
      {
        pollId: z.string().describe("Poll UUID"),
      },
      async (args) => {
        try {
          const text = await handleToolCall("get_poll", args, client, stdioSession());
          return { content: [{ type: "text", text }] };
        } catch (e) {
          return { content: [{ type: "text", text: `Error: ${e instanceof Error ? e.message : String(e)}` }], isError: true };
        }
      },
    );
  • Input schema for get_poll: requires pollId (string, described as 'Poll UUID').
    "get_poll",
    TOOL_DESCRIPTIONS.get_poll,
    {
      pollId: z.string().describe("Poll UUID"),
  • Handler for get_poll tool. Parses pollId from args, then calls client.getPoll(pollId) and client.getOptions(pollId) in parallel via Promise.all. Returns poll metadata (title, status, etc.) plus the time slot options array with their IDs.
    case "get_poll": {
      const { pollId } = z.object({ pollId: z.string() }).parse(args);
      const [poll, options] = await Promise.all([
        client.getPoll(pollId),
        client.getOptions(pollId),
      ]);
    
      return JSON.stringify({
        ...poll,
        options,
      }, null, 2);
    }
  • Tool description explaining that get_poll returns poll metadata and time slot options (but not votes), and is used to retrieve optionId values for vote_on_poll or finalize_poll.
    get_poll:
      "Get poll metadata and time slot options (but NOT votes). " +
      "Returns title, status, deadline, location, and all available time slots with their option IDs. " +
      "Use this to retrieve optionId values needed for vote_on_poll or finalize_poll. " +
      "To see who voted, use get_results instead.",
  • Client method getPoll(pollId) that makes a GET request to /api/open/polls/{pollId} and returns a Poll object (containing id, title, status, deadline, location, etc.).
    async getPoll(pollId: string): Promise<Poll> {
      return this.request<Poll>("GET", `/api/open/polls/${pollId}`);
    }
Behavior4/5

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

No annotations are provided, so the description carries full burden. It transparently states the tool returns specific fields (title, status, deadline, location, time slots with option IDs) and explicitly says votes are not returned. Could mention idempotency or lack of side effects, but description is adequate for a read-only operation.

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 three sentences, front-loaded with purpose. Each sentence serves a distinct role: stating function and exclusion, listing returned data, and providing usage guidance. No wasted words.

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 one parameter, no output schema, and no annotations, the description is fairly complete. It covers what is returned and how to use the results. Could mention error conditions or prerequisites, but overall sufficient for the tool's simplicity.

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 schema covers 100% of parameters, with pollId described as 'Poll UUID'. The description adds minimal extra meaning beyond stating that pollId is used to retrieve optionId values. Baseline 3 is appropriate as schema does the heavy lifting.

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 retrieves poll metadata and time slot options, explicitly excluding votes. It uses specific verbs and resources, and differentiates from sibling tools like get_results and vote_on_poll.

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 explicitly instructs to use this tool to obtain optionId values for vote_on_poll or finalize_poll, and directs to get_results for vote details. This provides clear when-to-use and when-not-to-use guidance with named alternatives.

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/timergy-app/timergy'

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