Skip to main content
Glama

list_projects

Retrieve detailed information about all Todoist projects, including IDs, names, URLs, and favorite or inbox status, structured in JSON format for easy integration and analysis.

Instructions

List all projects in Todoist. Returns structured JSON data with project details including id, name, url, is_favorite, and is_inbox status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that lists all Todoist projects, applying caching logic before fetching from API.
    export async function listProjects(): Promise< ProjectsResponse & { cached_at?: string } > { try { ensureCacheDirectory(); const cachedData = tryReadFromCache(); if (cachedData) { return cachedData; } const projectsData = await fetchProjectsFromAPI(); const result = createCachedResult(projectsData); writeToCache(result); return result; } catch (error) { throw new Error(`Failed to list projects: ${getErrorMessage(error)}`); } }
  • Type definition for the response structure returned by listProjects.
    interface ProjectsResponse { projects: TodoistProject[]; total_count: number; }
  • Helper function to fetch projects directly from the Todoist API endpoint.
    async function fetchProjectsFromAPI(): Promise<ProjectsResponse> { const todoistClient = getTodoistClient(); const apiResponse = await todoistClient.get<TodoistProject[]>('/projects'); return { projects: apiResponse.data, total_count: apiResponse.data.length, }; }
  • Usage of listProjects in getBrianOnlyProjects filter function.
    const allProjects = await listProjects(); const filteredProjects = allProjects.projects.filter(isBrianOnlyProject); return { projects: filteredProjects, total_count: filteredProjects.length, };
  • Export/registration of project-related tools in tools index, though list_projects itself is a supporting service.
    export { getInboxProjectsTool, getBeckySharedProjectsTool, getBrianSharedProjectsTool, getBrianOnlyProjectsTool, listGtdProjectsTool, createProjectLabelTool,

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/bkotos/todoist-mcp'

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