Skip to main content
Glama

get_results

Retrieve voting results for a Timergy scheduling poll to identify time slots with the highest participant availability and determine the best meeting time.

Instructions

Get voting results for a Timergy poll, showing who voted yes/maybe/no for each time slot. Use this after participants have voted to see which slot has the most availability. To finalize, pick the optionId with the most 'yes' votes and call finalize_poll.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pollIdYesPoll UUID

Implementation Reference

  • The actual API call implementation for fetching poll results.
    async getResults(pollId: string): Promise<Vote[]> {
      const data = await this.request<{ votes: Vote[] }>("GET", `/api/open/polls/${pollId}/results`);
      return data.votes;
    }
  • The MCP tool handler case that processes the 'get_results' tool call, parses inputs, and calls the client.
    case "get_results": {
      const { pollId } = z.object({ pollId: z.string() }).parse(args);
      const [poll, options, votes] = await Promise.all([
        client.getPoll(pollId),
        client.getOptions(pollId),
        client.getResults(pollId),
      ]);
    
      // Group votes by option
      const grouped = new Map<string, { option: typeof options[0]; yes: string[]; maybe: string[]; no: string[] }>();
      for (const opt of options) {
        grouped.set(opt.id, { option: opt, yes: [], maybe: [], no: [] });
      }
      for (const v of votes) {
        const group = grouped.get(v.optionId);
        if (!group) continue;
        const name = v.voterName || "Anonymous";
        if (v.availability === "yes") group.yes.push(name);
        else if (v.availability === "maybe") group.maybe.push(name);
        else if (v.availability === "no") group.no.push(name);
      }
    
      const summary = Array.from(grouped.values()).map((g) => ({
        optionId: g.option.id,
        start: g.option.start,
        end: g.option.end,

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