Skip to main content
Glama
devrev

DevRev MCP Server

Official
by devrev

update_part

Modify existing enhancement details like name, description, dates, owners, or stage in DevRev to keep project tracking current.

Instructions

Update an existing part (enhancement) in DevRev

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes
idYesThe DevRev ID of the part
nameNoThe name of the part
owned_byNoThe DevRev IDs of the users assigned to the part
descriptionNoThe description of the part
target_close_dateNoThe target closed date of the part, for example: 2025-06-03T00:00:00Z
target_start_dateNoThe target start date of the part, for example: 2025-06-03T00:00:00Z
stageNoThe stage DevRev ID of the part. Use valid_stage_transition tool to get the list of valid stages you an update to.

Implementation Reference

  • Handler for the 'update_part' tool: validates arguments, builds payload for parts.update API, calls make_devrev_request, and returns success/error message.
    elif name == "update_part": if not arguments: raise ValueError("Missing arguments") payload = {} id = arguments.get("id") if not id: raise ValueError("Missing id parameter") payload["id"] = id type = arguments.get("type") if not type: raise ValueError("Missing type parameter") payload["type"] = type part_name = arguments.get("name") if part_name: payload["name"] = part_name owned_by = arguments.get("owned_by") if owned_by: payload["owned_by"] = owned_by description = arguments.get("description") if description: payload["description"] = description target_close_date = arguments.get("target_close_date") if target_close_date: payload["target_close_date"] = target_close_date target_start_date = arguments.get("target_start_date") if target_start_date: payload["target_start_date"] = target_start_date stage = arguments.get("stage") if stage: payload["stage_v2"] = stage response = make_devrev_request( "parts.update", payload ) if response.status_code != 200: error_text = response.text return [ types.TextContent( type="text", text=f"Update part failed with status {response.status_code}: {error_text}" ) ] return [ types.TextContent( type="text", text=f"Part updated successfully: {id}" ) ]
  • Registration of the 'update_part' tool in the list_tools handler, including name, description, and input schema.
    types.Tool( name="update_part", description="Update an existing part (enhancement) in DevRev", inputSchema={ "type": "object", "properties": { "type": {"type": "string", "enum": ["enhancement"]}, "id": {"type": "string", "description": "The DevRev ID of the part"}, "name": {"type": "string", "description": "The name of the part"}, "owned_by": {"type": "array", "items": {"type": "string"}, "description": "The DevRev IDs of the users assigned to the part"}, "description": {"type": "string", "description": "The description of the part"}, "target_close_date": {"type": "string", "description": "The target closed date of the part, for example: 2025-06-03T00:00:00Z"}, "target_start_date": {"type": "string", "description": "The target start date of the part, for example: 2025-06-03T00:00:00Z"}, "stage": {"type": "string", "description": "The stage DevRev ID of the part. Use valid_stage_transition tool to get the list of valid stages you an update to."}, }, "required": ["id", "type"], }, ),
  • Input schema/JSON Schema for the 'update_part' tool parameters.
    inputSchema={ "type": "object", "properties": { "type": {"type": "string", "enum": ["enhancement"]}, "id": {"type": "string", "description": "The DevRev ID of the part"}, "name": {"type": "string", "description": "The name of the part"}, "owned_by": {"type": "array", "items": {"type": "string"}, "description": "The DevRev IDs of the users assigned to the part"}, "description": {"type": "string", "description": "The description of the part"}, "target_close_date": {"type": "string", "description": "The target closed date of the part, for example: 2025-06-03T00:00:00Z"}, "target_start_date": {"type": "string", "description": "The target start date of the part, for example: 2025-06-03T00:00:00Z"}, "stage": {"type": "string", "description": "The stage DevRev ID of the part. Use valid_stage_transition tool to get the list of valid stages you an update to."}, }, "required": ["id", "type"], },
  • Helper utility make_devrev_request used by update_part handler to POST payload to DevRev API endpoint 'parts.update'.
    def make_devrev_request(endpoint: str, payload: Dict[str, Any]) -> requests.Response: """ Make an authenticated request to the DevRev API. Args: endpoint: The API endpoint path (e.g., "works.get" or "search.hybrid") payload: The JSON payload to send Returns: requests.Response object Raises: ValueError: If DEVREV_API_KEY environment variable is not set """ api_key = os.environ.get("DEVREV_API_KEY") if not api_key: raise ValueError("DEVREV_API_KEY environment variable is not set") headers = { "Authorization": f"{api_key}", "Content-Type": "application/json", } return requests.post( f"https://api.devrev.ai/{endpoint}", headers=headers, json=payload )

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

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