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
| Name | Required | Description | Default |
|---|---|---|---|
| pollId | Yes | Poll UUID |
Implementation Reference
- src/client.ts:116-119 (handler)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; } - src/tools.ts:140-165 (handler)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,