Skip to main content
Glama

cancel_build

Destructive

Cancel a running build by providing the build ID. Stops an active build process on Codemagic.

Instructions

Cancel a running Codemagic build.

Args: build_id: The build ID to cancel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
build_idYes

Implementation Reference

  • The MCP tool handler for cancel_build. It is decorated with @mcp.tool(annotations=ToolAnnotations(destructiveHint=True)) and calls client.cancel_build(build_id).
    @mcp.tool(annotations=ToolAnnotations(destructiveHint=True))
    async def cancel_build(build_id: str) -> Any:
        """Cancel a running Codemagic build.
    
        Args:
            build_id: The build ID to cancel.
        """
        async with CodemagicClient() as client:
            return await client.cancel_build(build_id)
  • CodemagicClient helper method that sends a POST request to /builds/{build_id}/cancel to cancel the build.
    async def cancel_build(self, build_id: str) -> Any:
        return await self._post(f"/builds/{build_id}/cancel")
  • Registration function that calls builds.register(mcp), which registers all build tools including cancel_build.
    def register_all_tools(mcp: FastMCP) -> None:
        apps.register(mcp)
        builds.register(mcp)
        artifacts.register(mcp)
        caches.register(mcp)
        variables.register(mcp)
        webhooks.register(mcp)
  • Top-level call to register_all_tools(mcp) which ultimately registers cancel_build.
    register_all_tools(mcp)
Behavior3/5

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

Annotations already declare destructiveHint: true. The description adds that it cancels a 'running' build, which is helpful, but does not disclose side effects (e.g., whether artifacts are lost, if it is reversible, or authorization needs).

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?

Two sentences, no wasted words. Every part earns its place, including the argument description. Ideal conciseness for a simple tool.

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?

For a one-param destructive tool, the description covers the core action and parameter. However, it omits return value or confirmation, and doesn't mention constraints like 'build must be running' which is given but not elaborated. Acceptable but not thorough.

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?

With 0% schema description coverage, the description adds 'The build ID to cancel' for the only parameter. This is basic but sufficient for a single string parameter with a clear name. It does not elaborate on format or source.

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 verb-resource pair: 'Cancel a running Codemagic build.' It uniquely identifies the tool's function, and among siblings there is no other cancel-like tool, so differentiation is implicit.

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 (e.g., waiting for build to complete, or other build management actions). There is no mention of prerequisites or conditions for cancellation.

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