Skip to main content
Glama

calendar_add

Add events to macOS Calendar by specifying title, start and end dates, and optional calendar name using AppleScript integration.

Instructions

[Calendar operations] Add a new event to Calendar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesEvent title
startDateYesStart date and time (YYYY-MM-DD HH:MM:SS)
endDateYesEnd date and time (YYYY-MM-DD HH:MM:SS)
calendarNoCalendar name (optional)Calendar

Implementation Reference

  • Handler function that generates AppleScript to add a calendar event using provided title, startDate, endDate, and optional calendar.
    script: (args) => `
      tell application "Calendar"
        set theStartDate to current date
        set hours of theStartDate to ${args.startDate.slice(11, 13)}
        set minutes of theStartDate to ${args.startDate.slice(14, 16)}
        set seconds of theStartDate to ${args.startDate.slice(17, 19)}
    
        set theEndDate to theStartDate + (1 * hours)
        set hours of theEndDate to ${args.endDate.slice(11, 13)}
        set minutes of theEndDate to ${args.endDate.slice(14, 16)}
        set seconds of theEndDate to ${args.endDate.slice(17, 19)}
    
        tell calendar "${args.calendar || "Calendar"}"
          make new event with properties {summary:"${args.title}", start date:theStartDate, end date:theEndDate}
        end tell
      end tell
    `,
  • JSON Schema defining input parameters for the calendar_add tool.
    schema: {
      type: "object",
      properties: {
        title: {
          type: "string",
          description: "Event title",
        },
        startDate: {
          type: "string",
          description: "Start date and time (YYYY-MM-DD HH:MM:SS)",
        },
        endDate: {
          type: "string",
          description: "End date and time (YYYY-MM-DD HH:MM:SS)",
        },
        calendar: {
          type: "string",
          description: "Calendar name (optional)",
          default: "Calendar",
        },
      },
      required: ["title", "startDate", "endDate"],
    },
  • Registers all tools for listing, constructing tool names like 'calendar_add' from category 'calendar' and script 'add'.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: this.categories.flatMap((category) =>
        category.scripts.map((script) => ({
          name: `${category.name}_${script.name}`, // Changed from dot to underscore
          description: `[${category.description}] ${script.description}`,
          inputSchema: script.schema || {
            type: "object",
            properties: {},
          },
        })),
      ),
    }));
  • src/index.ts:26-26 (registration)
    Registers the calendar category containing the 'add' script into the MCP server.
    server.addCategory(calendarCategory);
  • Core execution logic: invokes the script handler function (for calendar_add) with arguments to generate AppleScript, then executes it.
    const scriptContent =
      typeof script.script === "function"
        ? script.script(request.params.arguments)
        : script.script;
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('Add a new event') but doesn't cover permissions needed, whether the operation is idempotent, error conditions, or what happens on success. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 brief and front-loaded with the core action. The bracketed prefix is slightly redundant but doesn't significantly impact efficiency. It could be more polished but avoids unnecessary verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what happens after adding the event, what permissions are required, or potential side effects. The context demands more completeness given the tool's complexity and lack of structured metadata.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents all 4 parameters. The description adds no parameter-specific information beyond what's in the schema, meeting the baseline expectation but not providing additional semantic context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Add') and resource ('new event to Calendar'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'calendar_list' beyond the basic operation type, and the bracketed prefix '[Calendar operations]' adds minimal value.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or exclusions, leaving the agent with no usage framework beyond the basic operation implied by the name.

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/joshrutkowski/applescript-mcp'

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