Skip to main content
Glama

productivity_calendar_event

Create calendar events in iCal format for scheduling and time management. Specify title, date, time, duration, and description to generate structured calendar entries.

Instructions

Generate a calendar event in iCal format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesEvent title
dateYesDate (YYYY-MM-DD)
timeNoTime (HH:MM)09:00
duration_minutesNoDuration in minutes
descriptionNoEvent description

Implementation Reference

  • The tool `productivity_calendar_event` is defined, schema-validated, and implemented within the `registerProductivityTools` function in `src/modules/productivity.ts`. It takes title, date, time, duration_minutes, and description as inputs and returns an iCal formatted string.
    server.tool("productivity_calendar_event", "Generate a calendar event in iCal format", {
      title: z.string().describe("Event title"),
      date: z.string().describe("Date (YYYY-MM-DD)"),
      time: z.string().default("09:00").describe("Time (HH:MM)"),
      duration_minutes: z.number().default(60).describe("Duration in minutes"),
      description: z.string().default("").describe("Event description")
    }, async ({ title, date, time, duration_minutes, description }) => {
      const start = `${date.replace(/-/g, "")}T${time.replace(":", "")}00`;
      const endDate = new Date(`${date}T${time}:00`);
      endDate.setMinutes(endDate.getMinutes() + duration_minutes);
      const end = endDate.toISOString().replace(/[-:]/g, "").split(".")[0];
      const ical = `BEGIN:VCALENDAR\nVERSION:2.0\nBEGIN:VEVENT\nDTSTART:${start}\nDTEND:${end}\nSUMMARY:${title}\nDESCRIPTION:${description}\nEND:VEVENT\nEND:VCALENDAR`;
      return { content: [{ type: "text", text: `**Calendar Event Created**\n\n**${title}**\nDate: ${date}\nTime: ${time}\nDuration: ${duration_minutes}min\n\n\`\`\`ical\n${ical}\n\`\`\`\n\n*Save as .ics file and import to your calendar.*` }] };
    });

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/ElromEvedElElyon/claw-mcp-toolkit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server