Skip to main content
Glama

get_polarion_project

Retrieve detailed metadata and configuration settings for a specific Polarion project using its project ID to understand project structure and settings.

Instructions

<purpose>Get detailed information about a specific Polarion project</purpose>

<when_to_use>
- When you need detailed project metadata (description, settings, etc.)
- After using get_polarion_projects() to identify the project_id
- When you need project configuration details
- RARELY needed for most exploration tasks
</when_to_use>

<workflow_position>
OPTIONAL: Use after get_polarion_projects() if project details are needed
USUALLY SKIP: Most tasks should go directly to get_polarion_work_items()
</workflow_position>

<parameters>
- project_id: Exact project ID from get_polarion_projects() results
- fields: "@basic" for essential info, "@all" for complete details
</parameters>

<note>Most users should skip this and go directly to exploring work items</note>

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsNo@basic
project_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for get_polarion_project: decorated with @mcp.tool(), validates inputs implicitly via types, calls PolarionClient.get_project(), and returns formatted JSON response.
    @mcp.tool()
    def get_polarion_project(project_id: str, fields: str = "@basic") -> str:
        """
        <purpose>Get detailed information about a specific Polarion project</purpose>
        
        <when_to_use>
        - When you need detailed project metadata (description, settings, etc.)
        - After using get_polarion_projects() to identify the project_id
        - When you need project configuration details
        - RARELY needed for most exploration tasks
        </when_to_use>
        
        <workflow_position>
        OPTIONAL: Use after get_polarion_projects() if project details are needed
        USUALLY SKIP: Most tasks should go directly to get_polarion_work_items()
        </workflow_position>
        
        <parameters>
        - project_id: Exact project ID from get_polarion_projects() results
        - fields: "@basic" for essential info, "@all" for complete details
        </parameters>
        
        <note>Most users should skip this and go directly to exploring work items</note>
        """
        logger.info(f"Fetching project {project_id} from Polarion")
        project = polarion_client.get_project(project_id, fields)
        if project:
            return json.dumps({
                "status": "success",
                "message": f"Successfully fetched project: {project_id}",
                "project": project
            }, indent=2)
        return json.dumps({
            "status": "error",
            "message": f"Failed to fetch project {project_id}. Project may not exist or access is denied."
        }, indent=2)
  • Core helper method in PolarionClient that executes the REST API call to retrieve specific project details from Polarion, handles authentication, errors, and returns project data.
    def get_project(self, project_id: str, fields: str = "@basic") -> Optional[Dict]:
        """Fetch specific project details from Polarion REST API."""
        try:
            self._ensure_token()
            api_url = f"{POLARION_BASE_URL}/rest/v1/projects/{project_id}"
            params = {'fields[projects]': fields}
            response = self.session.get(api_url, params=params, headers=self._headers(), timeout=REQUEST_TIMEOUT_SECONDS)
            if response.status_code == 404:
                logger.warning(f"Project not found: {project_id}")
                return None
            self._handle_api_response(response, f"fetch project {project_id}")
            project_data = response.json()
            logger.info(f"Fetched project: {project_id}")
            return project_data
        except Exception as e:
            logger.error(f"Failed to fetch project {project_id}: {e}")
            return None
  • The @mcp.tool() decorator registers this function as an MCP tool named 'get_polarion_project' based on function name.
    @mcp.tool()
  • Function signature defines input schema: required project_id (str), optional fields (str, default '@basic'), output str (JSON).
    def get_polarion_project(project_id: str, fields: str = "@basic") -> str:
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 describes the tool's function (retrieving detailed project information), specifies that it's optional in workflows, and notes it's rarely needed for most tasks. However, it doesn't explicitly mention whether this is a read-only operation (though implied by 'Get'), potential rate limits, or authentication requirements, leaving some behavioral aspects uncovered.

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 well-structured with clear XML-like tags (<purpose>, <when_to_use>, etc.) that make it easy to parse. Each section is front-loaded with essential information, and every sentence earns its place by providing specific guidance or clarification without unnecessary verbosity. The bullet points enhance readability while maintaining brevity.

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's moderate complexity (2 parameters, no annotations, but with an output schema), the description is complete enough. It covers purpose, usage guidelines, workflow positioning, parameter semantics, and includes a helpful note. With an output schema present, the description appropriately doesn't need to explain return values, focusing instead on when and how to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate fully. It does so by explaining both parameters: project_id ('Exact project ID from get_polarion_projects() results') and fields ('@basic for essential info, @all for complete details'), adding crucial meaning beyond the bare schema. This provides clear semantic context for each parameter's purpose and usage.

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 as 'Get detailed information about a specific Polarion project' with specific verb ('Get') and resource ('Polarion project'), and distinguishes it from siblings like get_polarion_projects (which lists projects) and get_polarion_work_items (which focuses on work items). The <purpose> tag explicitly articulates this distinct function.

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 ('When you need detailed project metadata', 'After using get_polarion_projects()') and when not to use ('RARELY needed for most exploration tasks', 'USUALLY SKIP: Most tasks should go directly to get_polarion_work_items()'). It names alternatives (get_polarion_projects, get_polarion_work_items) and positions the tool in a workflow, offering comprehensive usage context.

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