Skip to main content
Glama
mjucius

Cozi MCP Server

by mjucius

Delete an appointment

delete_appointment

Delete a scheduled appointment from your Cozi Family Organizer calendar by specifying the appointment ID, year, and month.

Instructions

Delete an appointment. Returns true on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appointment_idYes
yearYes
monthYes

Implementation Reference

  • The deleteAppointmentHandler function that executes the tool logic. It calls client.deleteAppointment(appointmentId, year, month) and returns a boolean indicating success.
    export async function deleteAppointmentHandler(
      client: CoziClient,
      appointmentId: string,
      year: number,
      month: number,
    ): Promise<boolean> {
      return client.deleteAppointment(appointmentId, year, month);
    }
  • Registration of the 'delete_appointment' tool on the MCP server via server.registerTool(). Defines inputSchema with appointment_id, year, month.
    server.registerTool(
      'delete_appointment',
      {
        title: 'Delete an appointment',
        description: 'Delete an appointment. Returns true on success.',
        inputSchema: {
          appointment_id: z.string(),
          year: z.number().int(),
          month: z.number().int().min(1).max(12),
        },
      },
      async ({ appointment_id, year, month }) => {
        const result = await deleteAppointmentHandler(await getClient(), appointment_id, year, month);
        return { content: [{ type: 'text', text: JSON.stringify(result) }] };
      },
    );
  • The CoziClient.deleteAppointment method on the client. It sends a POST request to the calendar endpoint with a delete payload formatted by toApiDeleteFormat().
    async deleteAppointment(appointmentId: string, year: number, month: number): Promise<boolean> {
      await this.ensureAuthenticated();
      await this.http.request({
        method: 'POST',
        endpoint: this.accountEndpoint(`/calendar/${year}/${month}`),
        body: [toApiDeleteFormat({ id: appointmentId } as CoziAppointment)],
      });
      return true;
    }
  • The toApiDeleteFormat helper that creates the API request body for deleting an appointment.
    export function toApiDeleteFormat(a: CoziAppointment): Record<string, unknown> {
      if (!a.id) throw new ValidationError('Cannot delete appointment without ID');
      return { itemType: 'appointment', delete: { id: a.id } };
    }
  • Input schema for the delete_appointment tool: appointment_id (string), year (int), month (int 1-12).
    inputSchema: {
      appointment_id: z.string(),
      year: z.number().int(),
      month: z.number().int().min(1).max(12),
    },
Behavior2/5

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

No annotations exist, and the description only adds 'Returns true on success', omitting whether deletion is irreversible, permissions required, or error behavior. Lacks critical behavioral context.

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?

Two short, direct sentences with no wasted words, though it sacrifices completeness for brevity.

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

Completeness1/5

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

With no annotations, no output schema, and three required parameters, the description is far too minimal to fully guide correct usage, especially given sibling tools.

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

Parameters1/5

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

Schema description coverage is 0%, and the description does not explain any of the three parameters (appointment_id, year, month), leaving the agent to infer meaning from names alone.

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 'Delete an appointment', which is a specific verb+resource combination, distinguishing it from sibling tools like create_appointment and update_appointment.

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?

No guidance on when to use this tool versus alternatives, no prerequisites or exclusions provided.

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/mjucius/cozi_mcp'

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