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);
    }

Tool Definition Quality

Score is being calculated. Check back soon.

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