Skip to main content
Glama

get_todos

Retrieve all todo checklist items across tasks and projects, including completion status, assignees, due dates, and project context for comprehensive task management.

Instructions

Get all todo checklist items across all tasks and projects.

Returns comprehensive todo data including:

  • Checkbox items within tasks for granular tracking

  • Completion status and assignee information

  • Parent task details with project context

  • Due dates and priority relative to parent task

  • Estimated vs actual time for checklist items

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idNoProductive task ID to filter todos by
page_numberNoPage number for pagination
page_sizeNoOptional number of todos per page (max 200)
extra_filtersNoAdditional Productive query filters using API syntax. Common filters: filter[task_id][eq] (ID), filter[status][eq] (1: open, 2: closed), filter[assignee_id][eq] (ID).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of the get_todos tool handler. Builds parameters for the Productive API, fetches todos via the client, filters the response, and handles errors with context logging.
    async def get_todos(
        ctx: Context,
        task_id: int = None,
        page_number: int = None,
        page_size: int = config.items_per_page,
        extra_filters: dict = None
    ) -> ToolResult:
        """List todo checklist items with optional filters.
    
        Developer notes:
        - task_id is an int; API expects filter[task_id] to be array or scalar; we send scalar.
        - Enforces configurable default page[size] when not provided.
        - Use extra_filters for status ints (1=open, 2=closed) or assignee filters.
        - Sorting not supported by API - uses default order.
        - Applies utils.filter_response.
        """
        try:
            await ctx.info("Fetching todos")
            params = {}
            if page_number is not None:
                params["page[number]"] = page_number
            params["page[size]"] = page_size
            if task_id is not None:
                params["filter[task_id]"] = [task_id]
            if extra_filters:
                params.update(extra_filters)
    
            result = await client.get_todos(params=params if params else None)
            await ctx.info("Successfully retrieved todos")
            
            filtered = filter_response(result)
            
            return filtered
            
        except ProductiveAPIError as e:
            await _handle_productive_api_error(ctx, e, "todos")
        except Exception as e:
            await ctx.error(f"Unexpected error fetching todos: {str(e)}")
            raise e
  • server.py:425-457 (registration)
    MCP tool registration for 'get_todos' using @mcp.tool decorator. Delegates to the handler in tools.py and includes input schema via Annotated Fields.
    @mcp.tool
    async def get_todos(
        ctx: Context,
        task_id: Annotated[
            int, Field(description="Productive task ID to filter todos by")
        ] = None,
        page_number: Annotated[int, Field(description="Page number for pagination")] = None,
        page_size: Annotated[
            int, Field(description="Optional number of todos per page (max 200)")
        ] = None,
        extra_filters: Annotated[
            dict,
            Field(
                description="Additional Productive query filters using API syntax. Common filters: filter[task_id][eq] (ID), filter[status][eq] (1: open, 2: closed), filter[assignee_id][eq] (ID)."
            ),
        ] = None,
    ) -> Dict[str, Any]:
        """Get all todo checklist items across all tasks and projects.
    
        Returns comprehensive todo data including:
        - Checkbox items within tasks for granular tracking
        - Completion status and assignee information
        - Parent task details with project context
        - Due dates and priority relative to parent task
        - Estimated vs actual time for checklist items
        """
        return await tools.get_todos(
            ctx,
            task_id=task_id,
            page_number=page_number,
            page_size=page_size,
            extra_filters=extra_filters,
        )
  • Input schema definition using Pydantic Annotated and Field for the get_todos tool parameters, providing descriptions and types for MCP.
        ctx: Context,
        task_id: Annotated[
            int, Field(description="Productive task ID to filter todos by")
        ] = None,
        page_number: Annotated[int, Field(description="Page number for pagination")] = None,
        page_size: Annotated[
            int, Field(description="Optional number of todos per page (max 200)")
        ] = None,
        extra_filters: Annotated[
            dict,
            Field(
                description="Additional Productive query filters using API syntax. Common filters: filter[task_id][eq] (ID), filter[status][eq] (1: open, 2: closed), filter[assignee_id][eq] (ID)."
            ),
        ] = None,
    ) -> Dict[str, Any]:
  • Helper method in the ProductiveClient class that performs the actual HTTP GET request to the /todos endpoint with optional parameters.
    async def get_todos(self, params: Optional[dict] = None) -> Dict[str, Any]:
        """Get all todos
        """
        return await self._request("GET", "/todos", params=params)
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes what data is returned (e.g., completion status, assignee information, due dates) and implies a read-only operation ('Get'), but doesn't mention potential side effects, authentication needs, rate limits, or error handling. It adds some context about the return format but lacks details on pagination behavior or API constraints.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by a bulleted list of return data. Each bullet adds value by detailing the comprehensive nature of the response. There's minimal waste, though the bullet list could be slightly more concise.

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

Completeness4/5

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

Given the tool's complexity (4 parameters, 100% schema coverage, output schema present), the description is reasonably complete. It explains what data is returned, which complements the output schema. However, it lacks context on when to use this tool versus siblings and doesn't address behavioral aspects like pagination or error handling, leaving some gaps for the agent.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all 4 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., it doesn't explain how 'task_id' interacts with 'extra_filters' or clarify pagination defaults). Baseline 3 is appropriate since the schema does the heavy lifting, but the description doesn't compensate with additional insights.

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: 'Get all todo checklist items across all tasks and projects.' It specifies the verb ('Get') and resource ('todo checklist items') with scope ('across all tasks and projects'). However, it doesn't explicitly differentiate from sibling tools like 'get_todo' (singular) or 'get_tasks', leaving some ambiguity about when to use this versus those alternatives.

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 sibling tools like 'get_todo' (for a single todo) or 'get_tasks' (for tasks rather than todos), nor does it specify prerequisites or exclusions. The agent must infer usage from the name and description alone.

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

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