Skip to main content
Glama

vote_on_poll

Submit availability votes for time slots in a scheduling poll. Choose 'yes', 'maybe', or 'no' for each option to help determine optimal meeting times.

Instructions

Submit votes on a Timergy poll. First call get_poll to retrieve the available optionId values. Each vote maps an optionId to an availability: 'yes' (available), 'maybe' (might work), or 'no' (unavailable). A unique voter token is auto-generated per voter name. Resubmitting with the same voter name updates previous votes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pollIdYesPoll UUID
voterNameYesName of the voter
voterEmailNoOptional voter email for finalization notification
votesYesOne vote per time slot

Implementation Reference

  • The handler implementation for the `vote_on_poll` tool. It validates the input using Zod, manages a persistent voter token for the session, and calls the `client.vote` method.
    case "vote_on_poll": {
      const input = z.object({
        pollId: z.string(),
        voterName: z.string(),
        voterEmail: z.string().optional(),
        votes: z.array(z.object({
          optionId: z.string(),
          availability: z.enum(["yes", "maybe", "no"]),
        })),
      }).parse(args);
    
      // Reuse or generate voterToken per voter name
      const tokenKey = `${input.pollId}:${input.voterName}`;
      let voterToken = voterTokenMap.get(tokenKey);
      if (!voterToken) {
        voterToken = randomUUID();
        voterTokenMap.set(tokenKey, voterToken);
      }
    
      await client.vote(input.pollId, {
        voterName: input.voterName,
        voterToken,
        voterEmail: input.voterEmail,
        votes: input.votes,
      });
    
      return JSON.stringify({
        success: true,
        voterName: input.voterName,
        votesSubmitted: input.votes.length,
      }, null, 2);
    }
Behavior4/5

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

With no annotations, the description carries full burden and discloses key behaviors: it explains that votes map optionId to availability with meanings ('yes', 'maybe', 'no'), mentions auto-generation of voter tokens, and states that resubmitting updates previous votes. However, it lacks details on permissions, rate limits, or error handling.

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 front-loaded with the core purpose, followed by essential usage steps and behavioral details in three concise sentences. Every sentence adds value without redundancy, making it efficient and well-structured.

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 annotations and no output schema, the description provides good context for a mutation tool: it explains the voting process, prerequisites, and update behavior. However, it lacks information on return values or error cases, which would enhance completeness for an agent.

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 already documents all parameters well. The description adds minimal value beyond schema: it clarifies that optionId values come from get_poll and explains availability enum meanings, but these are partially covered in schema descriptions. Baseline 3 is appropriate.

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 specific action ('Submit votes on a Timergy poll') and resource ('poll'), distinguishing it from siblings like create_poll, finalize_poll, get_poll, and get_results. It specifies the verb 'submit votes' rather than generic terms.

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?

Explicit guidance is provided: 'First call get_poll to retrieve the available optionId values' tells when to use a sibling tool first. It distinguishes this tool from get_poll (for retrieval) and get_results (for viewing outcomes), though it doesn't explicitly mention when not to use it.

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