Skip to main content
Glama
paulieb89

PyP6Xer MCP Server

pyp6xer_wbs_analysis

Read-onlyIdempotent

Analyze WBS hierarchy with rollups of task counts, schedule range, and cost summary per node. Gain insights into project structure and performance.

Instructions

Return the WBS hierarchy with task counts and cost rollups per node.

Shows each WBS element's direct and total (rolled-up) activity counts, schedule range, and cost summary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cache_keyNoCache key identifying the loaded XER file (set when calling pyp6xer_load_file)default
proj_idNoProject ID or short name; uses first project if omitted

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The pyp6xer_wbs_analysis tool handler function. It returns the WBS hierarchy with task counts and cost rollups per node. Defined with @mcp.tool decorator, takes cache_key, proj_id, and ctx parameters.
    @mcp.tool(annotations=ToolAnnotations(readOnlyHint=True, destructiveHint=False, idempotentHint=True, openWorldHint=False))
    def pyp6xer_wbs_analysis(
        cache_key: Annotated[str, Field(description="Cache key identifying the loaded XER file (set when calling pyp6xer_load_file)")] = "default",
        proj_id: Annotated[str | None, Field(description="Project ID or short name; uses first project if omitted")] = None,
        ctx: Context = None,
    ) -> str:
        """Return the WBS hierarchy with task counts and cost rollups per node.
    
        Shows each WBS element's direct and total (rolled-up) activity counts,
        schedule range, and cost summary.
        """
        xer = _get_xer(ctx, cache_key)
        proj = _get_project(xer, proj_id)
    
        def _wbs_node_dict(node) -> dict:
            all_tasks = node.all_tasks
            direct_tasks = node.tasks if hasattr(node, "tasks") else []
            completed = sum(1 for t in all_tasks if t.status.is_completed)
            return {
                "wbs_id": node.uid,
                "code": node.full_code,
                "name": node.name,
                "depth": node.depth,
                "direct_activities": len(direct_tasks),
                "total_activities": len(all_tasks),
                "completed_activities": completed,
                "budgeted_cost": round(node.budgeted_cost, 2),
                "actual_cost": round(node.actual_cost, 2),
                "remaining_cost": round(node.remaining_cost, 2),
                "children_count": len(node.children),
            }
    
        nodes = sorted(proj.wbs_nodes, key=lambda n: n.full_code)
        return json.dumps({
            "total_wbs_nodes": len(nodes),
            "wbs_nodes": [_wbs_node_dict(n) for n in nodes],
        }, indent=2)
  • server.py:1199-1201 (registration)
    Registration decorator @mcp.tool on pyp6xer_wbs_analysis function. The tool is registered as an MCP tool via the FastMCP framework with readOnlyHint=True, destructiveHint=False, idempotentHint=True, openWorldHint=False annotations.
    # ---------------------------------------------------------------------------
    # ── WBS ANALYSIS ─────────────────────────────────────────────────────────────
    # ---------------------------------------------------------------------------
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds valuable detail about what the tool returns: direct and rolled-up counts, schedule ranges, and cost summaries, confirming it is a query-only operation.

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 consists of two short sentences: the first front-loads the core purpose, the second adds specifics. No redundant information, making it highly concise and well-structured.

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

Completeness5/5

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

The description adequately covers the tool's purpose and output types (counts, costs, schedule). With a low parameter count (2, fully described in schema), an output schema present, and annotations covering idempotency, the description is complete for an analysis tool.

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?

Input schema has 100% coverage with clear descriptions for both parameters. The tool description does not add any further explanation about parameters, so the baseline score of 3 applies.

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 returns the WBS hierarchy with specific metrics (task counts, cost rollups), using a specific verb 'Return' and naming the resource. It distinguishes itself from sibling analysis tools by focusing on WBS structure.

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 gives no indication of when to use this tool versus alternatives like pyp6xer_progress_summary or pyp6xer_critical_path. It lacks explicit context on preferred use cases or exclusions.

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/paulieb89/pyp6xer-mcp'

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