Skip to main content
Glama

getTaskList

Retrieve all tasks from a plan with optional filtering by status to manage and organize your workflow effectively.

Instructions

获取计划中所有任务的列表,可按状态进行过滤。

Args: status_filter (str, optional): 用于过滤任务的状态字符串。 可接受的值: 'pending', 'in_progress', 'completed', 'failed', 'skipped'。

Returns: ToolResponse[List[TaskOutput]]: 包含任务列表的响应对象。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
status_filterNo

Implementation Reference

  • MCP tool handler and registration for 'getTaskList'. This thin wrapper delegates to PlanManager.getTaskList() and uses type hints for schema.
    @mcp.tool()
    def getTaskList(status_filter: Optional[str] = None) -> ToolResponse[List[TaskOutput]]:
        """
        获取计划中所有任务的列表,可按状态进行过滤。
    
        Args:
            status_filter (str, optional): 用于过滤任务的状态字符串。
                                         可接受的值: 'pending', 'in_progress', 'completed', 'failed', 'skipped'。
        
        Returns:
              ToolResponse[List[TaskOutput]]: 包含任务列表的响应对象。
        """
        return plan_manager.getTaskList(status_filter)
  • Core logic implementation of getTaskList in PlanManager class, filters tasks by status_filter if provided and returns them wrapped in a dict.
    def getTaskList(self, status_filter: Optional[str] = None) -> Dict:
        """获取任务列表,可按状态过滤"""
        if status_filter:
            tasks_to_return = [
                task for task in self.plan_data["tasks"] 
                if task["status"] == status_filter
            ]
        else:
            tasks_to_return = self.plan_data["tasks"]
        
        return {"success": True, "data": tasks_to_return}
  • Pydantic model defining the structure of each TaskOutput in the list returned by getTaskList.
    class TaskOutput(BaseModel):
        """
        用于工具函数返回任务信息时,定义单个任务输出的Pydantic模型。
        """
        id: int
        name: str
        status: str
        dependencies: List[int]
        reasoning: str
        result: Optional[str] = None
  • Generic Pydantic model for ToolResponse[T], used as return type ToolResponse[List[TaskOutput]] for getTaskList.
    class ToolResponse(BaseModel, Generic[T]):
        """
        一个通用的工具响应模型,用于标准化所有工具的返回结构。
        """
        success: bool = Field(True, description="操作是否成功。")
        message: Optional[str] = Field(None, description="关于操作结果的可读消息。")
        data: Optional[T] = Field(None, description="操作返回的主要数据负载。")
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 mentions the tool returns a list of tasks and allows optional status filtering, but lacks details on permissions, rate limits, pagination, or error handling. For a read operation with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 well-structured and concise, with a clear purpose statement followed by Args and Returns sections. Each sentence adds value: the first states the core function, the second explains filtering, and the parameter/return details are necessary. It could be slightly more front-loaded by integrating the filtering note into the first sentence.

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 tool's low complexity (1 optional parameter) and lack of annotations/output schema, the description is minimally adequate. It covers the basic purpose and parameter semantics but misses behavioral aspects like response format details or usage context. For a simple read tool, this is acceptable but not comprehensive.

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 adds meaningful semantics beyond the input schema. The schema only indicates an optional 'status_filter' string with no description, but the description explains it's for filtering tasks by status and lists acceptable values ('pending', 'in_progress', etc.). This compensates for the 0% schema description coverage, though it doesn't detail default behavior when null.

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 a list of all tasks in the plan). It specifies the verb ('获取列表') and resource ('计划中所有任务'), making the function unambiguous. However, it doesn't explicitly differentiate from siblings like 'getCurrentTask' or 'getExecutableTaskList', which reduces it from a perfect 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 mentions filtering by status but doesn't compare to siblings like 'getCurrentTask' (for a single task) or 'getExecutableTaskList' (for executable tasks). Without this context, an agent might struggle to choose between similar list-retrieval tools.

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/donway19/MCPlanManager'

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