Skip to main content
Glama
cdmx-in
by cdmx-in

create_project

Create a new project in Goodday with customizable settings including templates, timelines, and ownership. Set up projects or sub-projects using structured parameters for organized project management.

Instructions

Create a new project in Goodday.

Args: name: Project name created_by_user_id: ID of user creating the project project_template_id: Project template ID (found in Organization settings → Project templates) parent_project_id: Parent project ID to create a sub project color: Project color (1-24) project_owner_user_id: Project owner user ID start_date: Project start date (YYYY-MM-DD) end_date: Project end date (YYYY-MM-DD) deadline: Project deadline (YYYY-MM-DD)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
created_by_user_idYes
project_template_idYes
parent_project_idNo
colorNo
project_owner_user_idNo
start_dateNo
end_dateNo
deadlineNo

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the create_project tool. It constructs a payload from input parameters and sends a POST request to the Goodday API endpoint 'projects/new-project' to create a new project, then formats and returns the result.
    @mcp.tool()
    async def create_project(
        name: str,
        created_by_user_id: str,
        project_template_id: str,
        parent_project_id: Optional[str] = None,
        color: Optional[int] = None,
        project_owner_user_id: Optional[str] = None,
        start_date: Optional[str] = None,
        end_date: Optional[str] = None,
        deadline: Optional[str] = None
    ) -> str:
        """Create a new project in Goodday.
    
        Args:
            name: Project name
            created_by_user_id: ID of user creating the project
            project_template_id: Project template ID (found in Organization settings → Project templates)
            parent_project_id: Parent project ID to create a sub project
            color: Project color (1-24)
            project_owner_user_id: Project owner user ID
            start_date: Project start date (YYYY-MM-DD)
            end_date: Project end date (YYYY-MM-DD)
            deadline: Project deadline (YYYY-MM-DD)
        """
        data = {
            "name": name,
            "createdByUserId": created_by_user_id,
            "projectTemplateId": project_template_id
        }
        
        if parent_project_id:
            data["parentProjectId"] = parent_project_id
        if color:
            data["color"] = color
        if project_owner_user_id:
            data["projectOwnerUserId"] = project_owner_user_id
        if start_date:
            data["startDate"] = start_date
        if end_date:
            data["endDate"] = end_date
        if deadline:
            data["deadline"] = deadline
        
        result = await make_goodday_request("projects/new-project", "POST", data)
        
        if not result:
            return "Unable to create project: No response received"
        
        if isinstance(result, dict) and "error" in result:
            return f"Unable to create project: {result.get('error', 'Unknown error')}"
        
        return f"Project created successfully: {format_project(result)}"
  • Helper function used by create_project to format the created project details into a readable string.
    def format_project(project: dict) -> str:
        """Format a project into a readable string with safe checks."""
        if not isinstance(project, dict):
            return f"Invalid project data: {repr(project)}"
    
        # Defensive defaults in case nested keys are not dicts
        status = project.get('status') if isinstance(project.get('status'), dict) else {}
        owner = project.get('owner') if isinstance(project.get('owner'), dict) else {}
    
        return f"""
    Project ID: {project.get('id', 'N/A')}
    Name: {project.get('name', 'N/A')}
    Health: {project.get('health', 'N/A')}
    Status: {status.get('name', 'N/A')}
    Start Date: {project.get('startDate', 'N/A')}
    End Date: {project.get('endDate', 'N/A')}
    Progress: {project.get('progress', 0)}%
    Owner: {owner.get('name', 'N/A')}
    """.strip()
  • Core helper function called by the create_project handler to perform the authenticated POST request to the Goodday API.
    async def make_goodday_request(endpoint: str, method: str = "GET", data: dict = None, subfolders: bool = True) -> dict[str, Any] | list[Any] | None:
        """Make a request to the Goodday API with proper error handling."""
        api_token = os.getenv("GOODDAY_API_TOKEN")
        if not api_token:
            raise ValueError("GOODDAY_API_TOKEN environment variable is required")
        
        headers = {
            "User-Agent": USER_AGENT,
            "gd-api-token": api_token,
            "Content-Type": "application/json"
        }
        
        # Automatically add subfolders=true for project task and document endpoints if not already present
        if subfolders and endpoint.startswith("project/") and ("/tasks" in endpoint or "/documents" in endpoint):
            if "?" in endpoint:
                if "subfolders=" not in endpoint:
                    endpoint += "&subfolders=true"
            else:
                endpoint += "?subfolders=true"
        
        url = f"{GOODDAY_API_BASE}/{endpoint.lstrip('/')}"
        
        async with httpx.AsyncClient() as client:
            try:
                if method.upper() == "POST":
                    response = await client.post(url, headers=headers, json=data, timeout=30.0)
                elif method.upper() == "PUT":
                    response = await client.put(url, headers=headers, json=data, timeout=30.0)
                elif method.upper() == "DELETE":
                    response = await client.delete(url, headers=headers, timeout=30.0)
                else:
                    response = await client.get(url, headers=headers, timeout=30.0)
    
                response.raise_for_status()
                return response.json()
    
            except httpx.HTTPStatusError as e:
                raise Exception(f"HTTP error {e.response.status_code}: {e.response.text}")
            except httpx.RequestError as e:
                raise Exception(f"Request error: {str(e)}")
            except Exception as e:
                raise Exception(f"Unexpected error: {str(e)}")
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Create a new project,' implying a write/mutation operation, but doesn't cover critical aspects like required permissions, whether the creation is irreversible, rate limits, or what happens on success/failure (e.g., returns a project ID). This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with a clear purpose statement followed by parameter details, but it's somewhat verbose with repetitive formatting. Every sentence in the 'Args' section adds value, but the overall text could be more streamlined (e.g., combining related parameters). It's front-loaded with the core function, but not optimally concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (9 parameters, mutation operation, no annotations, no output schema), the description is partially complete. It covers parameter semantics well but lacks behavioral context (e.g., permissions, side effects) and output details. For a creation tool, this leaves significant gaps, making it minimally adequate but with clear room for improvement.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description includes an 'Args' section that documents all 9 parameters with brief explanations, such as 'Project name' for 'name' and 'Project template ID (found in Organization settings → Project templates)' for 'project_template_id'. Since schema description coverage is 0%, this fully compensates by adding meaning beyond the bare schema, though some explanations could be more detailed (e.g., format hints beyond dates).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Create a new project in Goodday.' This is a specific verb ('Create') and resource ('project in Goodday'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_project' or 'get_projects', which are read operations, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., user permissions), when not to use it, or refer to sibling tools like 'get_project' for checking existing projects. This lack of context leaves the agent without usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/cdmx-in/goodday-mcp'

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