Skip to main content
Glama

getCurrentTask

Retrieve details of the currently active task marked as 'in_progress' from the MCPlanManager task management system.

Instructions

获取当前标记为 'in_progress' (正在进行中) 的任务详情。

Returns: ToolResponse[TaskOutput]: 包含当前任务详情的响应对象。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'getCurrentTask'. Decorated with @mcp.tool() which registers it, and delegates to PlanManager instance.
    @mcp.tool()
    def getCurrentTask() -> ToolResponse[TaskOutput]:
        """
        获取当前标记为 'in_progress' (正在进行中) 的任务详情。
        
        Returns:
            ToolResponse[TaskOutput]: 包含当前任务详情的响应对象。
        """
        return plan_manager.getCurrentTask()
  • Core logic of getCurrentTask in PlanManager class: retrieves the task with ID from state.current_task_id if exists.
    def getCurrentTask(self) -> Dict:
        """获取当前正在执行的任务"""
        current_id = self.plan_data["state"]["current_task_id"]
        if current_id is None:
            return {"success": False, "message": "No task is currently active"}
        
        task = self._find_task_by_id(current_id)
        if not task:
            return {"success": False, "message": f"Current task {current_id} not found"}
        
        return {"success": True, "data": task}
  • Pydantic model TaskOutput defining the structure of a task returned by the tool.
    class TaskOutput(BaseModel):
        """
        用于工具函数返回任务信息时,定义单个任务输出的Pydantic模型。
        """
        id: int
        name: str
        status: str
        dependencies: List[int]
        reasoning: str
        result: Optional[str] = None
  • Pydantic model ToolResponse[TaskOutput] defining the return type of the tool.
    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 states the tool returns task details for 'in_progress' tasks, but does not describe what happens if no such task exists (e.g., returns null, error, or empty), any rate limits, authentication needs, or side effects. For a tool with zero 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 appropriately sized and front-loaded: the first sentence clearly states the purpose, and the second specifies the return type. There is no wasted text, though the structure could be slightly improved by integrating the return information more seamlessly. Overall, it is efficient and earns its place.

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 simplicity (0 parameters, no output schema, no annotations), the description is adequate but not fully complete. It explains what the tool does and the return type, but lacks details on edge cases (e.g., no in_progress task) and behavioral traits. For a basic read operation, it meets minimum viability but could benefit from more context.

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 input schema has 0 parameters with 100% coverage, so the schema fully documents the lack of inputs. The description does not add parameter-specific information, which is unnecessary here. Baseline is 4 for 0 parameters, as no additional semantic clarification is needed beyond the schema's completeness.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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: '获取当前标记为 'in_progress' (正在进行中) 的任务详情' (Get details of the task currently marked as 'in_progress'). It specifies the exact verb ('获取' - get) and resource ('任务详情' - task details) with a precise scope filter ('in_progress'), and distinguishes it from siblings like getTaskList (which returns all tasks) or getExecutableTaskList (which returns executable tasks).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by specifying 'in_progress' tasks, suggesting it should be used when the agent needs details about the currently active task. However, it does not explicitly state when to use this tool versus alternatives like getTaskList or getPlanStatus, nor does it provide exclusions or prerequisites. The guidance is functional but not comprehensive.

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