Skip to main content
Glama

update_pipeline_variable

Modify pipeline variable values in Bitbucket repositories to configure CI/CD workflows and environment settings.

Instructions

Update a pipeline variable's value.

Args: repo_slug: Repository slug variable_uuid: Variable UUID (from list_pipeline_variables) value: New variable value Returns: Updated variable info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_slugYes
variable_uuidYes
valueYes

Implementation Reference

  • MCP tool handler: calls BitbucketClient.update_pipeline_variable and formats response.
    @mcp.tool() @handle_bitbucket_error @formatted def update_pipeline_variable( repo_slug: str, variable_uuid: str, value: str, ) -> dict: """Update a pipeline variable's value. Args: repo_slug: Repository slug variable_uuid: Variable UUID (from list_pipeline_variables) value: New variable value Returns: Updated variable info """ client = get_client() result = client.update_pipeline_variable(repo_slug, variable_uuid, value) return { "uuid": result.get("uuid"), "key": result.get("key"), "secured": result.get("secured"), }
  • BitbucketClient helper method: performs the HTTP PUT request to Bitbucket Pipelines API to update the variable value.
    def update_pipeline_variable( self, repo_slug: str, variable_uuid: str, value: str, ) -> dict[str, Any]: """Update a pipeline variable's value. Args: repo_slug: Repository slug variable_uuid: Variable UUID value: New variable value Returns: Updated variable info """ variable_uuid = ensure_uuid_braces(variable_uuid) result = self._request( "PUT", self._repo_path(repo_slug, "pipelines_config", "variables", variable_uuid), json={"value": value}, ) return self._require_result(result, "update pipeline variable")
  • src/server.py:560-560 (registration)
    FastMCP tool registration decorator for the update_pipeline_variable tool.
    @mcp.tool()
  • Pydantic model used for serializing pipeline variable responses in list/get/update operations.
    class PipelineVariableSummary(BaseModel): """Pipeline variable info.""" uuid: str = "" key: str = "" secured: bool = False value: Optional[str] = None # Only present for non-secured variables @classmethod def from_api(cls, data: dict) -> "PipelineVariableSummary": return cls( uuid=data.get("uuid", ""), key=data.get("key", ""), secured=data.get("secured", False), value=data.get("value"), # Will be None for secured variables )

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/JaviMaligno/mcp-server-bitbucket'

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