Skip to main content
Glama

check_polarion_status

Verify Polarion authentication and connection status to diagnose login issues, confirm setup before exploration, and troubleshoot when other tools return errors.

Instructions

<purpose>Verify Polarion authentication and connection status</purpose>

<when_to_use>
- When experiencing authentication errors
- To verify setup before starting exploration
- When debugging connection issues
- As a diagnostic tool when other tools fail
</when_to_use>

<workflow_position>
DIAGNOSTIC: Use when authentication issues occur
VERIFICATION: Use after set_polarion_token() to confirm setup
TROUBLESHOOTING: Use when other tools return 401 errors
</workflow_position>

<output>
Authentication status and next steps if issues found
</output>

<next_steps>
If no token: Use open_polarion_login() then set_polarion_token()
If token exists: Try get_polarion_projects() to test connectivity
</next_steps>

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler function for the 'check_polarion_status' tool. Decorated with @mcp.tool() for registration. It verifies the existence of a Polarion authentication token by checking the global polarion_client instance and a local token file, then returns a JSON status report with recommended next steps.
    @mcp.tool()
    def check_polarion_status() -> str:
        """
        <purpose>Verify Polarion authentication and connection status</purpose>
        
        <when_to_use>
        - When experiencing authentication errors
        - To verify setup before starting exploration
        - When debugging connection issues
        - As a diagnostic tool when other tools fail
        </when_to_use>
        
        <workflow_position>
        DIAGNOSTIC: Use when authentication issues occur
        VERIFICATION: Use after set_polarion_token() to confirm setup
        TROUBLESHOOTING: Use when other tools return 401 errors
        </workflow_position>
        
        <output>
        Authentication status and next steps if issues found
        </output>
        
        <next_steps>
        If no token: Use open_polarion_login() then set_polarion_token()
        If token exists: Try get_polarion_projects() to test connectivity
        </next_steps>
        """
        logger.info("Checking Polarion status")
        TOKEN_FILE = "polarion_token.json"
        status = {
            "has_token": bool(polarion_client.token or polarion_client.load_token()),
            "token_saved": os.path.exists(TOKEN_FILE)
        }
        
        next_steps = []
        if not status["has_token"]:
            next_steps.append("Use open_polarion_login() to authenticate")
            next_steps.append("Then use set_polarion_token() with generated token")
        else:
            next_steps.append("Authentication appears ready")
            next_steps.append("Use get_polarion_projects() to begin exploration")
        
        return json.dumps({
            "status": "success",
            "polarion_status": status,
            "next_steps": next_steps
        }, indent=2)
  • The load_token method of the PolarionClient class, directly called by the handler to check for a saved authentication token from 'polarion_token.json'.
    def load_token(self) -> Optional[str]:
        """Load token from file"""
        try:
            if os.path.exists(TOKEN_FILE):
                with open(TOKEN_FILE, 'r') as f:
                    token_data = json.load(f)
                    return token_data.get("token")
        except Exception as e:
            logger.error(f"Failed to load token: {e}")
        return None
  • Global instantiation of PolarionClient used by all Polarion MCP tools, including check_polarion_status.
    # Global Polarion client instance
    polarion_client = PolarionClient()
  • The MCP server run call that activates all @mcp.tool() decorated functions, including check_polarion_status.
    mcp.run(transport="stdio")
Behavior4/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. It effectively communicates that this is a diagnostic/verification tool (not a data retrieval tool), describes its output ('Authentication status and next steps'), and provides context about when it should be used in troubleshooting workflows. However, it doesn't explicitly mention whether this tool makes any network calls or has side effects, leaving some behavioral aspects implicit.

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 uses a well-structured format with clear semantic tags (<purpose>, <when_to_use>, etc.) that makes information easy to parse. Each section is front-loaded with the most important information, and there's no wasted text - every sentence serves a specific purpose in guiding the agent's understanding of when and how to use this diagnostic tool.

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 that this is a parameterless diagnostic tool with an output schema (which handles return value documentation), the description provides excellent contextual completeness. It covers purpose, usage scenarios, workflow positioning, and next steps - everything an agent needs to understand when and why to invoke this tool. The structured format ensures all relevant context is present without redundancy.

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 0 parameters with 100% schema description coverage, so the baseline would be 4. The description doesn't need to explain parameters, and it correctly doesn't attempt to do so. The structured format efficiently communicates that this is a parameterless diagnostic check without unnecessary elaboration.

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 the tool's purpose with a specific verb ('Verify') and resource ('Polarion authentication and connection status') in the <purpose> tag. It clearly distinguishes this diagnostic tool from its sibling tools that perform data retrieval or configuration operations, making it immediately clear what this tool does differently.

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 on when to use this tool through the <when_to_use> list and <workflow_position> section, which includes specific scenarios like authentication errors, setup verification, and debugging. It also references alternative tools (open_polarion_login, set_polarion_token, get_polarion_projects) in the <next_steps> section, giving clear direction on what to do instead when this tool reveals issues.

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/Sdunga1/MCP-Polarion'

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