Skip to main content
Glama

getPlanStatus

Retrieve comprehensive plan overview including metadata, progress tracking, and task status statistics from the MCPlanManager task management system.

Instructions

获取整个计划的全面概览,包括元数据、进度、任务状态统计等。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for the 'getPlanStatus' MCP tool. It is decorated with @mcp.tool() which registers it, and delegates execution to the PlanManager instance.
    @mcp.tool()
    def getPlanStatus() -> ToolResponse[PlanStatusData]:
        """获取整个计划的全面概览,包括元数据、进度、任务状态统计等。"""
        return plan_manager.getPlanStatus()
  • Core implementation of getPlanStatus in PlanManager class, computing plan progress, task counts, and status summary.
    def getPlanStatus(self) -> Dict:
        """获取计划状态"""
        total_tasks = len(self.plan_data["tasks"])
        if total_tasks == 0:
            return {
                "success": True, 
                "data": {
                    "meta": self.plan_data["meta"],
                    "state": self.plan_data["state"],
                    "progress": {"completed_tasks": 0, "total_tasks": 0, "progress_percentage": 0.0},
                    "task_counts": {"pending": 0, "in_progress": 0, "completed": 0, "failed": 0, "skipped": 0, "total": 0}
                }
            }
    
        completed_count = sum(1 for task in self.plan_data["tasks"] if task["status"] in ["completed", "skipped"])
        progress_percentage = (completed_count / total_tasks) * 100 if total_tasks > 0 else 0
        
        task_counts = {}
        for task in self.plan_data["tasks"]:
            status = task["status"]
            task_counts[status] = task_counts.get(status, 0) + 1
    
        status_data = {
            "meta": self.plan_data["meta"],
            "state": self.plan_data["state"],
            "progress": {
                "completed_tasks": completed_count,
                "total_tasks": total_tasks,
                "progress_percentage": round(progress_percentage, 2)
            },
            "task_counts": {
                "pending": task_counts.get("pending", 0),
                "in_progress": task_counts.get("in_progress", 0),
                "completed": task_counts.get("completed", 0),
                "failed": task_counts.get("failed", 0),
                "skipped": task_counts.get("skipped", 0),
                "total": total_tasks
            }
        }
        return {"success": True, "data": status_data}
  • Pydantic schema definitions for PlanStatusData and its submodels, used in the return type of getPlanStatus tool.
    class PlanStatusMeta(BaseModel):
        goal: str
        created_at: str
        updated_at: str
    
    class PlanStatusState(BaseModel):
        current_task_id: Optional[int]
        status: str
    
    class PlanProgress(BaseModel):
        completed_tasks: int
        total_tasks: int
        progress_percentage: float
    
    class PlanTaskCounts(BaseModel):
        pending: int
        in_progress: int
        completed: int
        failed: int
        skipped: int
        total: int
    
    class PlanStatusData(BaseModel):
        """
        用于getPlanStatus工具,定义其返回数据的详细模型。
        """
        meta: PlanStatusMeta
        state: PlanStatusState
        progress: PlanProgress
        task_counts: PlanTaskCounts 
Behavior2/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. While it indicates this is a read operation (获取 - get/retrieve), it doesn't specify whether this requires authentication, has rate limits, returns real-time vs cached data, or what happens if no plan exists. For a tool that presumably accesses plan data, this leaves significant behavioral questions unanswered.

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

Conciseness5/5

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

The description is a single, efficient sentence that immediately states the tool's purpose and scope. Every word contributes meaning - '整个计划' (entire plan), '全面概览' (comprehensive overview), and the specific elements returned. There's no redundancy or unnecessary elaboration.

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 has no parameters and no output schema, the description provides adequate basic information about what the tool returns (metadata, progress, task status statistics). However, without annotations or output schema, it doesn't specify the format, structure, or completeness of the returned data. For a status retrieval tool among many plan-related siblings, more context about the return value would be helpful.

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 tool has zero parameters (schema coverage 100%), so the description appropriately doesn't discuss parameters. The baseline for zero-parameter tools is 4, as there's no parameter documentation burden. The description focuses correctly on what the tool returns rather than what it accepts.

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 what the tool does ('获取整个计划的全面概览' - get a comprehensive overview of the entire plan) and specifies the scope of information returned (metadata, progress, task status statistics). It distinguishes this from sibling tools like getTaskList or getCurrentTask by focusing on overall plan status rather than individual tasks. However, it doesn't explicitly contrast with dumpPlan which might also provide plan information.

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. With siblings like getTaskList, getCurrentTask, dumpPlan, and visualizeDependencies that all provide different aspects of plan information, there's no indication of when this comprehensive overview is most appropriate versus more focused tools. No prerequisites, timing considerations, or exclusion criteria are mentioned.

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