get_shopping_list
Retrieve structured shopping list tasks from Todoist projects to view items, priorities, due dates, and labels in JSON format.
Instructions
Get all tasks from the "Shopping list" project in Todoist. Returns structured JSON data with task details including id, content, description, priority, due date, labels, and more.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/workflows-tasks.ts:39-63 (handler)The handler implementation for the 'get_shopping_list' tool. It calls getShoppingList() from task-retrieval service and returns the result as formatted JSON text content.export const getShoppingListTool: Tool = { schema: { name: 'get_shopping_list', description: 'Get all tasks from the "Shopping list" project in Todoist. Returns structured JSON data with task details including id, content, description, priority, due date, labels, and more.', inputSchema: { type: 'object', properties: {}, required: [], }, }, handler: async () => { console.error('Executing get_shopping_list...'); const result = await getShoppingList(); console.error('get_shopping_list completed successfully'); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }, };
- src/tools/workflows-tasks.ts:40-49 (schema)The schema definition for the 'get_shopping_list' tool, including name, description, and empty input schema (no parameters).schema: { name: 'get_shopping_list', description: 'Get all tasks from the "Shopping list" project in Todoist. Returns structured JSON data with task details including id, content, description, priority, due date, labels, and more.', inputSchema: { type: 'object', properties: {}, required: [], }, },
- src/handlers/tool-request-handler.ts:84-84 (registration)Registers the getShoppingListTool.handler in the toolsWithoutArgs registry for handling tool call requests.get_shopping_list: getShoppingListTool.handler,
- src/index.ts:111-111 (registration)Registers the tool schema in the ListToolsRequest handler to advertise the 'get_shopping_list' tool.getShoppingListTool.schema,
- The core helper function that fetches tasks from the Todoist 'Shopping list' project using a filter and transforms them into TasksResponse format.export async function getShoppingList(): Promise<TasksResponse> { return await fetchTasksByFilter( `##${ProjectNames.SHOPPING_LIST}`, 'get tasks from Shopping list project' ); }