Skip to main content
Glama

finalize_poll

Select the winning time slot to lock a scheduling poll and notify participants via email.

Instructions

Finalize a poll by picking the winning time slot. Call get_results first to find the best optionId. Uses the passphrase auto-saved from create_poll. If the MCP server was restarted since poll creation, provide the passphrase manually. This locks the poll and notifies participants who provided an email.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pollIdYesPoll UUID
optionIdYesWinning time slot option UUID (pick from get_results)
passphraseNoAdmin passphrase (auto-used from create_poll if available)

Implementation Reference

  • The 'finalize_poll' tool handler, responsible for validating inputs, retrieving the passphrase (either from input or session state), obtaining an admin token, and finalizing the poll via the client.
    case "finalize_poll": {
      const input = z.object({
        pollId: z.string(),
        optionId: z.string(),
        passphrase: z.string().optional(),
      }).parse(args);
    
      const passphrase = input.passphrase || passphraseMap.get(input.pollId);
      if (!passphrase) {
        return JSON.stringify({
          error: "No passphrase available. Provide the passphrase that was returned when the poll was created.",
        });
      }
    
      const adminToken = await client.getAdminToken(input.pollId, passphrase);
      const result = await client.finalize(input.pollId, input.optionId, adminToken);
    
      return JSON.stringify({
        success: true,
        pollId: result.id,
        title: result.title,
        status: result.status,
        finalizedOption: result.finalizedOption,
      }, 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