Skip to main content
Glama
mjucius

Cozi MCP Server

by mjucius

Remove items from a list

remove_items

Remove specific items from a Cozi list by providing the list ID and item IDs, keeping your shopping or to-do list organized.

Instructions

Remove items from a list. Returns true on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYes
item_idsYes

Implementation Reference

  • Handler function for the remove_items tool. Delegates to CoziClient.removeItems() and returns a boolean indicating success.
    export async function removeItemsHandler(
      client: CoziClient,
      listId: string,
      itemIds: string[],
    ): Promise<boolean> {
      return client.removeItems(listId, itemIds);
    }
  • Input schema for remove_items: expects list_id (string) and item_ids (array of strings).
    inputSchema: { list_id: z.string(), item_ids: z.array(z.string()) },
  • Registration of remove_items tool via server.registerTool(), called from registerItemTools().
    server.registerTool(
      'remove_items',
      {
        title: 'Remove items from a list',
        description: 'Remove items from a list. Returns true on success.',
        inputSchema: { list_id: z.string(), item_ids: z.array(z.string()) },
      },
      async ({ list_id, item_ids }) => {
        const result = await removeItemsHandler(await getClient(), list_id, item_ids);
        return { content: [{ type: 'text', text: JSON.stringify(result) }] };
      },
    );
  • Client-level implementation: sends a PATCH request to the list endpoint with remove operations for each item ID. Returns early true for empty array.
    async removeItems(listId: string, itemIds: string[]): Promise<boolean> {
      if (itemIds.length === 0) return true;
      await this.ensureAuthenticated();
      const operations = itemIds.map((id) => ({ op: 'remove', path: `/items/${id}` }));
      await this.http.request({
        method: 'PATCH',
        endpoint: this.accountEndpoint(`/list/${listId}`),
        body: { operations },
      });
      return true;
    }
  • TOOL_NAMES constant listing all tool names including 'remove_items'.
    export const TOOL_NAMES = [
      'family_members',
      'get_lists',
      'get_list_items',
      'create_list',
      'delete_list',
      'add_item',
      'update_item',
      'remove_items',
      'get_calendar',
      'create_appointment',
      'update_appointment',
      'delete_appointment',
    ] as const;
Behavior2/5

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

No annotations exist; the description only mentions return value. Does not disclose side effects, permanence, or error states despite being a mutation tool.

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

Conciseness3/5

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

Very short (2 sentences) and front-loaded, but under-specified. Conciseness comes at cost of missing crucial details.

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?

Missing output schema and annotations; description lacks details on behavior with non-existent IDs, error handling, or operational context for a required 2-parameter tool.

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

Parameters2/5

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

Schema coverage is 0%. Description adds no meaning beyond parameter names; does not explain expected format or constraints for list_id or item_ids.

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?

Clearly states the action (remove), resource (items from a list), and return value (true on success). Distinct from siblings like add_item or delete_list.

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 like update_item or delete_list. 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