Skip to main content
Glama

create_project

Create a new project in Todoist to organize tasks, with options for nesting, color coding, and favorites.

Instructions

Create a new project in Todoist.

Args: name: The name of the project parent_id: Parent project ID (for nested projects) color: Project color is_favorite: Whether to mark as favorite

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
parent_idNo
colorNo
is_favoriteNo

Implementation Reference

  • MCP tool handler for 'create_project': registers the tool, defines input schema via arguments, checks client, prepares kwargs, calls TodoistClient.create_project, and returns formatted success message with project details.
    @mcp.tool() async def create_project( name: str, parent_id: Optional[str] = None, color: Optional[str] = None, is_favorite: bool = False ) -> str: """Create a new project in Todoist. Args: name: The name of the project parent_id: Parent project ID (for nested projects) color: Project color is_favorite: Whether to mark as favorite """ _check_client() kwargs = {"name": name} if parent_id: kwargs["parent_id"] = parent_id if color: kwargs["color"] = color if is_favorite: kwargs["is_favorite"] = is_favorite project = await todoist_client.create_project(**kwargs) return ( f"Project created successfully!\n" f"ID: {project.id}\n" f"Name: {project.name}\n" f"URL: {project.url}" )
  • Core implementation in TodoistClient: constructs payload from name and kwargs, makes POST request to Todoist API /projects endpoint, parses response into TodoistProject model.
    async def create_project(self, name: str, **kwargs) -> TodoistProject: """Create a new project.""" payload = {"name": name, **kwargs} data = await self._request("POST", "/projects", json=payload) return TodoistProject(**data)
  • Pydantic model for TodoistProject used to validate and type the project data returned from API.
    class TodoistProject(BaseModel): """Represents a Todoist project.""" id: str name: str comment_count: int = 0 order: int = 0 color: str = "grey" is_shared: bool = False is_favorite: bool = False is_inbox_project: bool = False is_team_inbox: bool = False view_style: str = "list" url: str = "" parent_id: Optional[str] = None
  • Registration decorator @mcp.tool() that registers the create_project function as an MCP tool.
    @mcp.tool()

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

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