Skip to main content
Glama

update_deployment

Modify deployment configurations including name, version, tags, parameters, and work queue settings to adapt workflow automation to changing requirements.

Instructions

Update a deployment.

Args: deployment_id: The deployment UUID name: New name for the deployment description: New description version: New version tags: New tags parameters: New parameters work_queue_name: New work queue name

Returns: Details of the updated deployment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deployment_idYes
descriptionNo
nameNo
parametersNo
tagsNo
versionNo
work_queue_nameNo

Implementation Reference

  • The 'update_deployment' tool handler: an async function decorated with @mcp.tool that updates a Prefect deployment using the Prefect client, handling optional parameters and returning the updated deployment details with a UI link.
    @mcp.tool
    async def update_deployment(
        deployment_id: str,
        name: Optional[str] = None,
        description: Optional[str] = None,
        version: Optional[str] = None,
        tags: Optional[List[str]] = None,
        parameters: Optional[Dict[str, Any]] = None,
        work_queue_name: Optional[str] = None,
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        """
        Update a deployment.
        
        Args:
            deployment_id: The deployment UUID
            name: New name for the deployment
            description: New description
            version: New version
            tags: New tags
            parameters: New parameters
            work_queue_name: New work queue name
            
        Returns:
            Details of the updated deployment
        """
        async with get_client() as client:
            # Get current deployment
            deployment = await client.read_deployment(UUID(deployment_id))
            
            # Prepare update data
            update_data = {}
            if name is not None:
                update_data["name"] = name
            if description is not None:
                update_data["description"] = description
            if version is not None:
                update_data["version"] = version
            if tags is not None:
                update_data["tags"] = tags
            if parameters is not None:
                update_data["parameters"] = parameters
            if work_queue_name is not None:
                update_data["work_queue_name"] = work_queue_name
            
            # Update deployment
            updated_deployment = await client.update_deployment(
                deployment_id=UUID(deployment_id),
                **update_data
            )
            
            # Add UI link
            updated_deployment_dict = updated_deployment.model_dump()
            updated_deployment_dict["ui_url"] = get_deployment_url(deployment_id)
            
            return [types.TextContent(type="text", text=str(updated_deployment_dict))]
  • The @mcp.tool decorator registers the update_deployment function as an MCP tool.
    @mcp.tool
  • Function signature defines the input schema (parameters with types and defaults) and output type for the tool.
    async def update_deployment(
        deployment_id: str,
        name: Optional[str] = None,
        description: Optional[str] = None,
        version: Optional[str] = None,
        tags: Optional[List[str]] = None,
        parameters: Optional[Dict[str, Any]] = None,
        work_queue_name: Optional[str] = None,
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is an update operation (implying mutation) but doesn't describe important behavioral aspects: whether all fields must be provided or if partial updates are allowed (schema suggests nullable fields), what permissions are required, whether changes are reversible, or what happens to unspecified fields. The return statement is vague ('Details of the updated deployment').

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 well-structured with clear sections (Args, Returns) and uses bullet-like formatting. Every sentence serves a purpose: the opening statement defines the tool, the Args section documents parameters, and the Returns section indicates output. It could be slightly more concise by integrating the opening statement with the parameter list.

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 a mutation tool with 7 parameters, 0% schema description coverage, no annotations, and no output schema, the description provides basic parameter semantics but lacks critical context. It doesn't explain the update behavior (partial vs. full, idempotency), error conditions, authentication needs, or what the return 'Details' include. For a tool with this complexity, more behavioral and usage context is needed.

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?

Schema description coverage is 0%, so the description must compensate. It provides a clear list of all 7 parameters with brief explanations of what each represents (e.g., 'New name for the deployment', 'New tags'). This adds significant value beyond the schema's bare titles. However, it doesn't explain parameter constraints, formats (e.g., UUID format for deployment_id), or that most parameters are optional (nullable) except deployment_id.

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 the verb 'Update' and resource 'deployment', making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling update tools like 'update_variable' or 'update_work_queue' beyond the resource name, nor does it specify what aspects of a deployment can be updated beyond the listed parameters.

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 is provided about when to use this tool versus alternatives. The description doesn't mention prerequisites (like needing an existing deployment), when not to use it (e.g., for partial updates vs. full replacements), or how it relates to sibling tools like 'get_deployment' (to check current state) or 'delete_deployment'.

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/allen-munsch/mcp-prefect'

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