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
        ) 
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Update' implies a mutation operation, the description doesn't address critical behavioral aspects like required permissions, whether changes are reversible, error conditions, or what happens to unspecified fields. This leaves significant gaps for an agent to understand the tool's behavior.

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?

The description is a single, efficient sentence that communicates the core purpose without unnecessary words. It's appropriately sized and front-loaded with the essential information.

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 mutation tool with 8 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't address behavioral expectations, error handling, or provide context about what constitutes a valid update operation. The agent would need to guess about many important aspects of using this tool.

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 88% schema description coverage, the schema already documents most parameters well. The description adds no additional parameter information beyond what's in the schema. The baseline score of 3 reflects adequate parameter documentation primarily from the schema, not from the description.

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 action ('Update') and resource ('existing part (enhancement) in DevRev'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from sibling tools like 'update_work' or 'create_part', which would be needed for a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives like 'create_part' or 'update_work'. It mentions 'enhancement' in parentheses but doesn't explain if this is the only type of part that can be updated or how it differs from other part types.

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

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