Skip to main content
Glama
paulieb89

PyP6Xer MCP Server

pyp6xer_get_activity_schema

Read-onlyIdempotent

Retrieve field names for Primavera P6 activities. Use these fields to limit activity queries to only the columns you need.

Instructions

Return the available field names for activity read tools.

Use the returned field names with the fields parameter of pyp6xer_list_activities, pyp6xer_get_activity, and pyp6xer_search_activities to limit response size to only the columns you need.

summary_fields are available on list_activities and search_activities. detail_fields are only available on get_activity (they require fetching relationships and resources which are not on the list view).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual handler function for pyp6xer_get_activity_schema. It returns a JSON string with available field names (summary_fields and detail_fields) for activity read tools.
    @mcp.tool(annotations=ToolAnnotations(readOnlyHint=True, destructiveHint=False, idempotentHint=True, openWorldHint=False))
    def pyp6xer_get_activity_schema() -> str:
        """Return the available field names for activity read tools.
    
        Use the returned field names with the `fields` parameter of
        pyp6xer_list_activities, pyp6xer_get_activity, and pyp6xer_search_activities
        to limit response size to only the columns you need.
    
        summary_fields are available on list_activities and search_activities.
        detail_fields are only available on get_activity (they require fetching
        relationships and resources which are not on the list view).
        """
        return json.dumps({
            "summary_fields": ACTIVITY_SUMMARY_FIELDS,
            "detail_fields": ACTIVITY_DETAIL_FIELDS,
            "note": (
                "summary_fields: available on list_activities and search_activities. "
                "detail_fields: available on get_activity only."
            ),
        }, indent=2)
  • Defines ACTIVITY_SUMMARY_FIELDS, the list of field names returned by pyp6xer_get_activity_schema as 'summary_fields'. Available on list_activities and search_activities.
    ACTIVITY_SUMMARY_FIELDS: list[str] = [
        "task_id", "task_code", "name", "status", "type",
        "wbs", "wbs_name", "start", "finish",
        "target_start", "target_finish",
        "original_duration_days", "remaining_duration_days",
        "total_float_days", "free_float_days",
        "is_critical", "is_longest_path",
        "percent_complete", "budgeted_cost", "actual_cost", "remaining_cost",
    ]
  • Defines ACTIVITY_DETAIL_FIELDS, the list of field names returned by pyp6xer_get_activity_schema as 'detail_fields'. Includes summary fields plus additional fields only available on get_activity.
    ACTIVITY_DETAIL_FIELDS: list[str] = ACTIVITY_SUMMARY_FIELDS + [
        "actual_start", "actual_finish",
        "early_start", "early_finish",
        "late_start", "late_finish",
        "resources", "predecessors", "successors",
    ]
  • server.py:299-300 (registration)
    Decorator registering pyp6xer_get_activity_schema as an MCP tool via @mcp.tool(), marking it as readonly, non-destructive, idempotent, and open-world.
    @mcp.tool(annotations=ToolAnnotations(readOnlyHint=True, destructiveHint=False, idempotentHint=True, openWorldHint=False))
    def pyp6xer_get_activity_schema() -> str:
  • The function itself returns the activity schema (field names) as a JSON string. It acts as both handler and schema definition by returning the list of available fields for other tools.
    @mcp.tool(annotations=ToolAnnotations(readOnlyHint=True, destructiveHint=False, idempotentHint=True, openWorldHint=False))
    def pyp6xer_get_activity_schema() -> str:
        """Return the available field names for activity read tools.
    
        Use the returned field names with the `fields` parameter of
        pyp6xer_list_activities, pyp6xer_get_activity, and pyp6xer_search_activities
        to limit response size to only the columns you need.
    
        summary_fields are available on list_activities and search_activities.
        detail_fields are only available on get_activity (they require fetching
        relationships and resources which are not on the list view).
        """
        return json.dumps({
            "summary_fields": ACTIVITY_SUMMARY_FIELDS,
            "detail_fields": ACTIVITY_DETAIL_FIELDS,
            "note": (
                "summary_fields: available on list_activities and search_activities. "
                "detail_fields: available on get_activity only."
            ),
        }, indent=2)
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, etc. The description adds behavioral context beyond annotations by explaining that summary_fields are available on list/serach tools while detail_fields require get_activity, which involves fetching relationships and resources. No contradiction with annotations.

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?

Four sentences, front-loaded with purpose, then usage guidance, then explanatory details. Every sentence serves a clear purpose with no wasted words. Efficient 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?

Given the tool has no parameters and an output schema (assumed to define return structure), the description is complete. It explains the purpose, how to use the results, and the distinction between field categories, ensuring an agent can correctly invoke and utilize the tool.

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 zero parameters, so schema description coverage is 100%. The description adds no parameter-level information, which is acceptable since none exist. Baseline for 0 parameters is 4.

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 explicitly states 'Return the available field names for activity read tools,' clearly indicating the verb (return) and resource (field names). It distinguishes itself from sibling tools like pyp6xer_list_activities, pyp6xer_get_activity, and pyp6xer_search_activities by being a metadata schema tool.

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

Usage Guidelines5/5

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

The description provides explicit guidance: 'Use the returned field names with the `fields` parameter of pyp6xer_list_activities, pyp6xer_get_activity, and pyp6xer_search_activities to limit response size.' It also explains the distinction between summary_fields and detail_fields and their availability, giving clear context for when and how to use the tool.

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