Skip to main content
Glama
PhilippMT

Software Planning Tool

by PhilippMT

add_todo

Add a new task to your software development plan with title, description, complexity score, and optional code examples for better project management.

Instructions

Add a new todo item to the current plan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the todo item
descriptionYesDetailed description of the todo item
complexityYesComplexity score (0-10)
codeExampleNoOptional code example

Implementation Reference

  • MCP tool handler for 'add_todo': validates current goal exists, casts arguments to Todo shape, calls storage.addTodo, and returns the new todo as JSON text.
    case 'add_todo': { if (!this.currentGoal) { throw new McpError( ErrorCode.InvalidRequest, 'No active goal. Start a new planning session first.' ); } const todo = request.params.arguments as Omit< Todo, 'id' | 'isComplete' | 'createdAt' | 'updatedAt' >; const newTodo = await storage.addTodo(this.currentGoal.id, todo); return { content: [ { type: 'text', text: JSON.stringify(newTodo, null, 2), }, ], }; }
  • Tool registration in ListTools response, including input schema definition for 'add_todo' matching Todo properties.
    { name: 'add_todo', description: 'Add a new todo item to the current plan', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Title of the todo item', }, description: { type: 'string', description: 'Detailed description of the todo item', }, complexity: { type: 'number', description: 'Complexity score (0-10)', minimum: 0, maximum: 10, }, codeExample: { type: 'string', description: 'Optional code example', }, }, required: ['title', 'description', 'complexity'], }, },
  • TypeScript interface Todo defining the structure used for add_todo inputs and storage.
    export interface Todo { id: string; title: string; description: string; complexity: number; codeExample?: string; isComplete: boolean; createdAt: string; updatedAt: string; }
  • Storage helper function that implements the core logic: creates Todo with generated id/timestamps, appends to plan.todos, persists to JSON file.
    async addTodo( goalId: string, { title, description, complexity, codeExample }: Omit<Todo, 'id' | 'isComplete' | 'createdAt' | 'updatedAt'> ): Promise<Todo> { const plan = await this.getPlan(goalId); if (!plan) { throw new Error(`No plan found for goal ${goalId}`); } const todo: Todo = { id: Date.now().toString(), title, description, complexity, codeExample, isComplete: false, createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(), }; plan.todos.push(todo); plan.updatedAt = new Date().toISOString(); await this.save(); return todo; }

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

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