Skip to main content
Glama

delete_list

Remove lists you no longer need to free up memory and maintain organized data management in the par5-mcp server's parallel processing environment.

Instructions

Deletes an existing list by its ID.

WHEN TO USE:

  • To clean up lists that are no longer needed

  • To free up memory after processing is complete

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYesThe list ID returned by create_list.

Implementation Reference

  • src/index.ts:398-435 (registration)
    Registers the delete_list tool with MCP server, including description, input schema, and inline handler function.
    server.registerTool( "delete_list", { description: `Deletes an existing list by its ID. WHEN TO USE: - To clean up lists that are no longer needed - To free up memory after processing is complete`, inputSchema: { list_id: z.string().describe("The list ID returned by create_list."), }, }, async ({ list_id }) => { if (!lists.has(list_id)) { return { content: [ { type: "text", text: `Error: No list found with ID "${list_id}". The list may have already been deleted or the ID is incorrect.`, }, ], isError: true, }; } const itemCount = lists.get(list_id)?.length; lists.delete(list_id); return { content: [ { type: "text", text: `Successfully deleted list "${list_id}" which contained ${itemCount} items.`, }, ], }; }, );
  • The handler function for delete_list: checks if list exists, deletes it from the global 'lists' Map, and returns success or error message.
    async ({ list_id }) => { if (!lists.has(list_id)) { return { content: [ { type: "text", text: `Error: No list found with ID "${list_id}". The list may have already been deleted or the ID is incorrect.`, }, ], isError: true, }; } const itemCount = lists.get(list_id)?.length; lists.delete(list_id); return { content: [ { type: "text", text: `Successfully deleted list "${list_id}" which contained ${itemCount} items.`, }, ], }; },
  • Zod input schema for delete_list tool, requiring a 'list_id' string.
    inputSchema: { list_id: z.string().describe("The list ID returned by create_list."), },
  • Global Map storing all created lists by ID, used by delete_list handler.
    const lists = new Map<string, string[]>();

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/jrandolf/par5-mcp'

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