get_todos
Retrieve todos from a specific todo list in Basecamp by providing the project ID and todo list ID. Simplifies task management through direct API integration.
Instructions
Get todos from a todo list
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID | |
| todolist_id | Yes | The todo list ID |
Implementation Reference
- src/index.ts:593-605 (handler)MCP tool handler for 'get_todos' that authenticates the client, calls BasecampClient.getTodos, and returns formatted JSON response.case 'get_todos': { const todos = await client.getTodos(typedArgs.project_id, typedArgs.todolist_id); return { content: [{ type: 'text', text: JSON.stringify({ status: 'success', todos, count: todos.length }, null, 2) }] }; }
- src/index.ts:163-174 (registration)Tool registration in ListTools handler defining name, description, and input schema for 'get_todos'.{ name: 'get_todos', description: 'Get todos from a todo list', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'Project ID' }, todolist_id: { type: 'string', description: 'The todo list ID' }, }, required: ['project_id', 'todolist_id'], }, },
- src/lib/basecamp-client.ts:105-108 (helper)BasecampClient method implementing the API call to fetch todos from a specific todolist in a project.async getTodos(projectId: string, todolistId: string): Promise<Todo[]> { const response = await this.client.get(`/buckets/${projectId}/todolists/${todolistId}/todos.json`); return response.data; }
- src/types/basecamp.ts:50-62 (schema)TypeScript interface defining the structure of Todo objects returned by the get_todos tool.export interface Todo { id: string; content: string; description?: string; completed: boolean; due_on?: string; created_at: string; updated_at: string; assignees?: Person[]; creator: Person; project?: ProjectInfo; todolist?: { id: string; name: string; }; }