Skip to main content
Glama

get_todo

Retrieve detailed todo item information including task context, assignee details, due dates, time tracking, and attachments from Productive.io.

Instructions

Get specific todo checklist item details with full task context.

Returns detailed todo information including:

  • Checkbox item text and completion status

  • Parent task with project and client details

  • Assignee and team member information

  • Due date relative to parent task timeline

  • Time estimates vs actual completion time

  • Related comments and file attachments

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
todo_idYesProductive todo ID

Implementation Reference

  • The MCP tool handler function that executes the core logic: fetches the todo via the Productive client, applies response filtering, handles API errors consistently, and returns ToolResult.
    async def get_todo(ctx: Context, todo_id: int) -> ToolResult: """Fetch a single todo by ID and sanitize the response.""" try: await ctx.info(f"Fetching todo with ID: {todo_id}") result = await client.get_todo(todo_id) await ctx.info("Successfully retrieved todo") filtered = filter_response(result) return filtered except ProductiveAPIError as e: await _handle_productive_api_error(ctx, e, f"todo {todo_id}") except Exception as e: await ctx.error(f"Unexpected error fetching todo: {str(e)}") raise e
  • server.py:460-475 (registration)
    Registration of the 'get_todo' tool in the FastMCP server using @mcp.tool decorator. Defines input schema via Annotated[Field] for todo_id parameter and comprehensive docstring description.
    @mcp.tool async def get_todo( ctx: Context, todo_id: Annotated[int, Field(description="Productive todo ID")], ) -> Dict[str, Any]: """Get specific todo checklist item details with full task context. Returns detailed todo information including: - Checkbox item text and completion status - Parent task with project and client details - Assignee and team member information - Due date relative to parent task timeline - Time estimates vs actual completion time - Related comments and file attachments """ return await tools.get_todo(ctx, todo_id)
  • Helper method in ProductiveClient that makes the raw API request to fetch a single todo by ID from the Productive /todos/{id} endpoint.
    async def get_todo(self, todo_id: int) -> Dict[str, Any]: """Get todo by ID""" return await self._request("GET", f"/todos/{str(todo_id)}")
  • tools.py:9-24 (helper)
    Shared helper function used by get_todo (and other tools) for consistent error handling of ProductiveAPIError, logging via MCP context, and special handling for 404/401 responses.
    async def _handle_productive_api_error(ctx: Context, e: ProductiveAPIError, resource_type: str = "data") -> None: """Handle ProductiveAPIError consistently across all tool functions. Developer notes: - ctx: MCP context for logging and error handling - e: The ProductiveAPIError exception - resource_type: Type of resource being fetched (e.g., "projects", "tasks", "comments") """ await ctx.error(f"Productive API error: {e.message}") if e.status_code == 404: await ctx.warning(f"No {resource_type} found") elif e.status_code == 401: await ctx.error("Invalid API token - check configuration") raise e

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/druellan/Productive-GET-MCP'

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