Skip to main content
Glama

create_poll

Create a scheduling poll with time slots for participants to vote. Provide title and time options (ISO 8601 with timezone). Get a shareable URL to send to participants and an admin passphrase for managing results.

Instructions

Create a Timergy scheduling poll (like Doodle) where participants vote on preferred time slots. Provide a title and at least 2-5 time slot options with ISO 8601 date-times (include timezone, e.g. 2026-03-20T18:00:00+02:00 or use UTC with Z suffix). Returns a shareable URL to send to participants and a passphrase for admin access. The passphrase is automatically remembered for finalize_poll. Workflow: create_poll -> share URL -> wait for votes -> get_results -> finalize_poll.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesPoll title (e.g. 'Dinner with Moritz')
optionsYesTime slot options (recommend 3-5)
descriptionNoOptional poll description
deadlineNoOptional voting deadline (ISO 8601)
locationNoOptional event location
creatorNameNoName shown as poll creator (e.g. 'Claude for Max')

Implementation Reference

  • The main handler logic for create_poll: validates input with Zod, calls client.createPoll(), stores the passphrase in session state, and returns formatted JSON with pollId, URL, passphrase, options, etc.
    case "create_poll": {
      const input = z.object({
        title: z.string(),
        options: z.array(z.object({ start: z.string(), end: z.string() })).min(1),
        description: z.string().optional(),
        deadline: z.string().optional(),
        location: z.string().optional(),
        creatorName: z.string().optional(),
      }).parse(args);
    
      const result = await client.createPoll(input);
      passphraseMap.set(result.id, result.passphrase);
    
      return JSON.stringify({
        pollId: result.id,
        title: result.title,
        url: result.url,
        passphrase: result.passphrase,
        options: result.options,
        expiresAt: result.expiresAt,
        note: "Share the URL with participants. The passphrase is saved for finalization.",
      }, null, 2);
    }
  • TypeScript interface defining the input schema for createPoll: title, options (start/end), and optional description, deadline, location, creatorName.
    export interface CreatePollInput {
      title: string;
      options: Array<{ start: string; end: string }>;
      description?: string;
      deadline?: string;
      location?: string;
      creatorName?: string;
    }
  • TypeScript interface defining the result returned from createPoll: pollId, title, URL, passphrase, options, expiration, and timestamps.
    export interface CreatePollResult {
      id: string;
      title: string;
      description: string | null;
      url: string;
      passphrase: string;
      options: PollOption[];
      expiresAt: string;
      createdAt: string;
    }
  • HTTP client method that POSTs to /api/open/polls to create the poll on the Timergy API, then ensures a valid share URL is set.
    async createPoll(input: CreatePollInput & { source?: string }): Promise<CreatePollResult> {
      const result = await this.request<CreatePollResult>("POST", "/api/open/polls", { ...input, source: input.source || "mcp" });
      // Ensure URL is present; only override if it looks suspicious (not HTTPS and not localhost)
      if (!result.url) {
        result.url = `https://timergy.com/en/polls/${result.id}`;
      } else if (!result.url.startsWith("https://") && !result.url.startsWith("http://localhost")) {
        result.url = `https://timergy.com/en/polls/${result.id}`;
      }
      return result;
    }
  • src/index.ts:37-59 (registration)
    MCP tool registration using server.tool() with the name "create_poll", Zod schema for arguments, and a handler that delegates to handleToolCall.
    server.tool(
      "create_poll",
      TOOL_DESCRIPTIONS.create_poll,
      {
        title: z.string().describe("Poll title (e.g. 'Dinner with Moritz')"),
        options: z.array(z.object({
          start: z.string().describe("Slot start (ISO 8601 with timezone, e.g. 2026-03-20T18:00:00+02:00)"),
          end: z.string().describe("Slot end (ISO 8601 with timezone, e.g. 2026-03-20T20:00:00+02:00)"),
        })).min(1).describe("Time slot options (recommend 3-5)"),
        description: z.string().optional().describe("Optional poll description"),
        deadline: z.string().optional().describe("Optional voting deadline (ISO 8601)"),
        location: z.string().optional().describe("Optional event location"),
        creatorName: z.string().optional().describe("Name shown as poll creator (e.g. 'Claude for Max')"),
      },
      async (args) => {
        try {
          const text = await handleToolCall("create_poll", args, client, stdioSession());
          return { content: [{ type: "text", text }] };
        } catch (e) {
          return { content: [{ type: "text", text: `Error: ${e instanceof Error ? e.message : String(e)}` }], isError: true };
        }
      },
    );
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses that the tool returns a shareable URL and admin passphrase, and that the passphrase is remembered for finalize_poll. It does not mention authorization or rate limits, but the behavior is adequately described for a creation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is informative but slightly long. It is structured with a workflow list at the end, which is helpful. Some sentences could be condensed, but overall it earns its place.

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 the 6 parameters, full schema coverage, and no output schema or annotations, the description covers the key aspects: purpose, required inputs, workflow, return values. It is complete enough for an agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all 6 parameters. The description adds value by recommending 2-5 options, specifying ISO 8601 with timezone, and mentioning the passphrase. This goes beyond what the schema provides.

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 tool creates a Timergy scheduling poll like Doodle, specifying the verb 'create' and resource 'poll'. It distinguishes from sibling tools by mentioning the workflow with finalize_poll and get_results.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear workflow: create_poll -> share URL -> wait for votes -> get_results -> finalize_poll, and notes the passphrase is remembered for finalize_poll. However, it does not explicitly state when not to use the tool or list alternatives.

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