Skip to main content
Glama

get_project_tasks

Retrieve tasks from a specific Goodday project, including options for closed tasks and subfolder tasks, to manage project workflows effectively.

Instructions

Get tasks from a specific project.

Args: project_id: The ID of the project closed: Set to true to retrieve all open and closed tasks subfolders: Set to true to return tasks from project subfolders

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
closedNo
subfoldersNo

Implementation Reference

  • The core handler function for the MCP tool 'get_project_tasks'. It constructs the Goodday API endpoint based on project_id and optional parameters (closed, subfolders), fetches the task data using make_goodday_request, handles errors and unexpected formats, formats each task using format_task, and returns a markdown-formatted list of tasks separated by ---.
    async def get_project_tasks(project_id: str, closed: bool = False, subfolders: bool = False) -> str: """Get tasks from a specific project. Args: project_id: The ID of the project closed: Set to true to retrieve all open and closed tasks subfolders: Set to true to return tasks from project subfolders """ params = [] if closed: params.append("closed=true") if subfolders: params.append("subfolders=true") endpoint = f"project/{project_id}/tasks" if params: endpoint += "?" + "&".join(params) data = await make_goodday_request(endpoint) if not data: return "No tasks found." if isinstance(data, dict) and "error" in data: return f"Unable to fetch tasks: {data.get('error', 'Unknown error')}" if not isinstance(data, list): return f"Unexpected response format: {str(data)}" tasks = [format_task(task) for task in data] return "\n---\n".join(tasks)
  • Helper function used by get_project_tasks to format individual task dictionaries into a readable markdown string, safely handling nested structures like status and project.
    def format_task(task: dict) -> str: """Format a task into a readable string with safe checks.""" if not isinstance(task, dict): return f"Invalid task data: {repr(task)}" # Defensive defaults in case nested keys are not dicts status = task.get('status') if isinstance(task.get('status'), dict) else {} project = task.get('project') if isinstance(task.get('project'), dict) else {} return f""" **Task ID:** {task.get('shortId', 'N/A')} **Title:** {task.get('name', 'N/A')} **Status:** {status.get('name', 'N/A')} **Project:** {project.get('name', 'N/A')} **Assigned To:** {task.get('assignedToUserId', 'N/A')} **Priority:** {task.get('priority', 'N/A')} **Start Date:** {task.get('startDate', 'N/A')} **End Date:** {task.get('endDate', 'N/A')} **Description:** {task.get('message', 'No description')} """.strip()

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