Skip to main content
Glama

delete_cache

Destructive

Delete a specific build cache for a Codemagic application to free storage and force a fresh build.

Instructions

Delete a specific build cache for a Codemagic application.

Args: app_id: The Codemagic application ID. cache_id: The cache ID to delete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idYes
cache_idYes

Implementation Reference

  • The MCP tool handler that registers 'delete_cache' with a destructive hint, taking app_id and cache_id, and delegating to the client.
    @mcp.tool(annotations=ToolAnnotations(destructiveHint=True))
    async def delete_cache(app_id: str, cache_id: str) -> Any:
        """Delete a specific build cache for a Codemagic application.
    
        Args:
            app_id: The Codemagic application ID.
            cache_id: The cache ID to delete.
        """
        async with CodemagicClient() as client:
            return await client.delete_cache(app_id, cache_id)
  • The CodemagicClient helper method that sends the HTTP DELETE request to the API endpoint /apps/{app_id}/caches/{cache_id}.
    async def delete_cache(self, app_id: str, cache_id: str) -> Any:
        return await self._delete(f"/apps/{app_id}/caches/{cache_id}")
  • Registration: register_all_tools calls caches.register(mcp), which registers delete_cache as an MCP tool.
    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)
  • The schema is defined implicitly by the function signature: app_id: str, cache_id: str, returning Any. A destructiveHint annotation is also applied.
    @mcp.tool(annotations=ToolAnnotations(destructiveHint=True))
    async def delete_cache(app_id: str, cache_id: str) -> Any:
        """Delete a specific build cache for a Codemagic application.
    
        Args:
            app_id: The Codemagic application ID.
            cache_id: The cache ID to delete.
        """
        async with CodemagicClient() as client:
            return await client.delete_cache(app_id, cache_id)
Behavior3/5

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

Annotations already provide destructiveHint, and the description adds that it deletes a specific cache. However, it does not disclose irreversibility, permission requirements, or error handling beyond the annotation.

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 concise with two sentences and parameter listing, front-loading the main action. However, it could be slightly more structured with clearer formatting.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive action with no output schema, the description omits important details like irreversibility, expected response, or error scenarios. Adequate for basics but incomplete for safe invocation.

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

Parameters2/5

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

With 0% schema coverage, the description repeats parameter names and adds minimal context (e.g., 'Codemagic application ID'), but lacks format, examples, or constraints. Provides little value beyond the schema.

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 'Delete' and the resource 'specific build cache for a Codemagic application', distinguishing it from sibling 'delete_all_caches' by specifying a single cache.

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 delete a cache versus alternatives like clearing all caches or other operations. No context on prerequisites or conditions for use.

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