Skip to main content
Glama

remove_todo

Delete a specific task from your software development plan by providing its unique identifier to maintain an organized project workflow.

Instructions

Remove a todo item from the current plan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
todoIdYesID of the todo item to remove

Implementation Reference

  • MCP tool handler for 'remove_todo': validates current goal, extracts todoId from arguments, calls storage.removeTodo, and returns success message.
    case 'remove_todo': {
      if (!this.currentGoal) {
        throw new McpError(
          ErrorCode.InvalidRequest,
          'No active goal. Start a new planning session first.'
        );
      }
    
      const { todoId } = request.params.arguments as { todoId: string };
      await storage.removeTodo(this.currentGoal.id, todoId);
    
      return {
        content: [
          {
            type: 'text',
            text: `Successfully removed todo ${todoId}`,
          },
        ],
      };
    }
  • src/index.ts:169-182 (registration)
    Registers the 'remove_todo' tool in the list of available tools, including its description and input schema.
    {
      name: 'remove_todo',
      description: 'Remove a todo item from the current plan',
      inputSchema: {
        type: 'object',
        properties: {
          todoId: {
            type: 'string',
            description: 'ID of the todo item to remove',
          },
        },
        required: ['todoId'],
      },
    },
  • Core implementation that removes the specified todo from the plan by filtering the todos array and persisting changes to storage.
    async removeTodo(goalId: string, todoId: string): Promise<void> {
      const plan = await this.getPlan(goalId);
      if (!plan) {
        throw new Error(`No plan found for goal ${goalId}`);
      }
    
      plan.todos = plan.todos.filter((todo: Todo) => todo.id !== todoId);
      plan.updatedAt = new Date().toISOString();
      await this.save();
    }
  • Defines the input schema for the 'remove_todo' tool: requires a 'todoId' string.
    inputSchema: {
      type: 'object',
      properties: {
        todoId: {
          type: 'string',
          description: 'ID of the todo item to remove',
        },
      },
      required: ['todoId'],
    },

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/NightTrek/Software-planning-mcp'

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