Skip to main content
Glama

add_private_app

Add a private Git repository to Codemagic CI/CD using an SSH key. Provide the repository URL and base64-encoded private key.

Instructions

Add a new private repository to Codemagic using an SSH key.

Args: repository_url: The SSH URL of the private Git repository. ssh_key_data: Base64-encoded SSH private key. ssh_passphrase: Optional passphrase for the SSH key. project_type: Optional project type (e.g. "flutter-app", "react-native"). team_id: Optional team ID to add the app to.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repository_urlYes
ssh_key_dataYes
ssh_passphraseNo
project_typeNo
team_idNo

Implementation Reference

  • MCP tool handler that defines the 'add_private_app' tool, accepting repository_url, ssh_key_data, ssh_passphrase, project_type, and team_id as parameters, and delegates to CodemagicClient.add_private_app().
    @mcp.tool()
    async def add_private_app(
        repository_url: str,
        ssh_key_data: str,
        ssh_passphrase: str | None = None,
        project_type: str | None = None,
        team_id: str | None = None,
    ) -> Any:
        """Add a new private repository to Codemagic using an SSH key.
    
        Args:
            repository_url: The SSH URL of the private Git repository.
            ssh_key_data: Base64-encoded SSH private key.
            ssh_passphrase: Optional passphrase for the SSH key.
            project_type: Optional project type (e.g. "flutter-app", "react-native").
            team_id: Optional team ID to add the app to.
        """
        async with CodemagicClient() as client:
            return await client.add_private_app(
                repository_url=repository_url,
                ssh_key_data=ssh_key_data,
                ssh_passphrase=ssh_passphrase,
                project_type=project_type,
                team_id=team_id,
            )
  • Client method that constructs the API payload and POSTs to /apps/new to add a private app. Builds the payload with repositoryUrl, sshKey (data and optional passphrase), optional projectType, and optional teamId.
    async def add_private_app(
        self,
        repository_url: str,
        ssh_key_data: str,
        ssh_passphrase: str | None = None,
        project_type: str | None = None,
        team_id: str | None = None,
    ) -> Any:
        payload: dict[str, Any] = {
            "repositoryUrl": repository_url,
            "sshKey": {"data": ssh_key_data},
        }
        if ssh_passphrase is not None:
            payload["sshKey"]["passphrase"] = ssh_passphrase
        if project_type is not None:
            payload["projectType"] = project_type
        if team_id is not None:
            payload["teamId"] = team_id
        return await self._post("/apps/new", json=payload)
  • The tool is registered via the @mcp.tool() decorator on the add_private_app function inside the register() function in codemagic_mcp/tools/apps.py.
    @mcp.tool()
    async def add_private_app(
        repository_url: str,
        ssh_key_data: str,
        ssh_passphrase: str | None = None,
        project_type: str | None = None,
        team_id: str | None = None,
    ) -> Any:
        """Add a new private repository to Codemagic using an SSH key.
    
        Args:
            repository_url: The SSH URL of the private Git repository.
            ssh_key_data: Base64-encoded SSH private key.
            ssh_passphrase: Optional passphrase for the SSH key.
            project_type: Optional project type (e.g. "flutter-app", "react-native").
            team_id: Optional team ID to add the app to.
        """
        async with CodemagicClient() as client:
            return await client.add_private_app(
                repository_url=repository_url,
                ssh_key_data=ssh_key_data,
                ssh_passphrase=ssh_passphrase,
                project_type=project_type,
                team_id=team_id,
            )
Behavior2/5

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

No annotations exist, so the description must disclose side effects or requirements. It fails to mention authentication needs, validation of SSH key, or potential error conditions.

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

Conciseness4/5

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

The description is front-loaded with a clear purpose sentence followed by a compact ARGS list. No redundant information, but could be slightly more structured.

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 5 parameters, no output schema, and no annotations, the description adequately covers basic usage but omits details on validation, error handling, and expected outcomes.

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?

The description adds brief explanations for each parameter, such as noting ssh_key_data is base64-encoded. However, it lacks format specifications (e.g., SSH URL pattern) and valid project type values, partially compensating for the 0% schema coverage.

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 it adds a private repository via SSH key, distinguishing it from sibling 'add_app' which likely handles public repos or other methods. However, it does not explicitly contrast the two.

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?

No guidance on when to use this tool versus alternatives. The purpose is implied but no explicit context or exclusions are provided.

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/AgiMaulana/CodemagicMcp'

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