Skip to main content
Glama

getExecutableTaskList

Retrieve a list of executable tasks with all dependencies met and status marked as 'pending' for efficient task management in the MCPlanManager system.

Instructions

获取当前所有依赖已满足且状态为 'pending' 的可执行任务列表。

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'getExecutableTaskList', decorated with @mcp.tool() which also serves as registration. It delegates execution to the PlanManager instance's method of the same name.
    def getExecutableTaskList() -> ToolResponse[List[TaskOutput]]: """ 获取当前所有依赖已满足且状态为 'pending' 的可执行任务列表。 Returns: ToolResponse[List[TaskOutput]]: 包含可执行任务列表的响应对象。 """ return plan_manager.getExecutableTaskList()
  • Core business logic implementation in PlanManager class. Filters tasks that are 'pending' and have all dependencies satisfied (via _check_dependencies_satisfied helper), returning them in a dict format.
    def getExecutableTaskList(self) -> Dict: """获取所有可执行的任务列表""" executable_tasks = [] for task in self.plan_data["tasks"]: if task["status"] == "pending" and self._check_dependencies_satisfied(task): executable_tasks.append(task) return {"success": True, "data": executable_tasks}
  • Pydantic model defining the TaskOutput type used in the tool's response schema (ToolResponse[List[TaskOutput]]). Provides validation and serialization for output data.
    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], wrapping the tool output with success, message, and data fields. Used as ToolResponse[List[TaskOutput]] for this tool.
    class ToolResponse(BaseModel, Generic[T]): """ 一个通用的工具响应模型,用于标准化所有工具的返回结构。 """ success: bool = Field(True, description="操作是否成功。") message: Optional[str] = Field(None, description="关于操作结果的可读消息。") data: Optional[T] = Field(None, description="操作返回的主要数据负载。")

Other Tools

Related 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