Skip to main content
Glama
devrev

DevRev MCP Server

Official
by devrev

update_work

Modify existing work items in DevRev by updating fields like title, status, assignees, or sprint assignments to track progress changes.

Instructions

Update an existing work item (issue, ticket) in DevRev

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes
idYes
titleNo
bodyNo
applies_to_partNoThe DevRev ID of the part to which the work item applies
modified_byNoThe DevRev IDs of the users who modified the work item
owned_byNoThe DevRev IDs of the users who are assigned to the work item
stageNoThe stage name of the work item. Use valid_stage_transition tool to get the list of valid stages you an update to.
sprintNoThe DevRev ID of the sprint to be assigned to an issue.
subtypeNo

Implementation Reference

  • Handler for the 'update_work' tool: parses arguments into payload and calls DevRev API 'works.update' via make_devrev_request.
    elif name == "update_work":
        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
    
        title = arguments.get("title")
        if title:
            payload["title"] = title
    
        body = arguments.get("body", "")
        if body:
            payload["body"] = body
    
        modified_by = arguments.get("modified_by")
        if modified_by:
            payload["modified_by"] = modified_by
    
        owned_by = arguments.get("owned_by")
        if owned_by:
            payload["owned_by"] = owned_by
    
        applies_to_part = arguments.get("applies_to_part", [])
        if applies_to_part:
            payload["applies_to_part"] = applies_to_part
    
        stage = arguments.get("stage")
        if stage:
            payload["stage"] = {"name": stage}
    
        sprint = arguments.get("sprint")
        if sprint:
            payload["sprint"] = sprint
    
        subtype = arguments.get("subtype")
        if subtype:
            if subtype["drop"]:
                payload["custom_schema_spec"] = {"drop": {"subtype": True}, "tenant_fragment": True, "validate_required_fields": True}
            else:
                payload["custom_schema_spec"] = {"subtype": subtype["subtype"], "tenant_fragment": True, "validate_required_fields": True}
    
        response = make_devrev_request(
            "works.update",
            payload
        )
    
        if response.status_code != 200:
            error_text = response.text
            return [
                types.TextContent(
                    type="text",
                    text=f"Update object failed with status {response.status_code}: {error_text}"
                )
            ]
        
        return [
            types.TextContent(
                type="text",
                text=f"Object updated successfully: {id}"
            )
        ]
  • Registration of the 'update_work' tool in handle_list_tools(), including name, description, and input schema definition.
    types.Tool(
        name="update_work",
        description="Update an existing work item (issue, ticket) in DevRev",
        inputSchema={
            "type": "object",
            "properties": {
                "type": {"type": "string", "enum": ["issue", "ticket"]},
                "id": {"type": "string"},
                "title": {"type": "string"},
                "body": {"type": "string"},
                "applies_to_part": {"type": "string", "description": "The DevRev ID of the part to which the work item applies"},
                "modified_by": {"type": "array", "items": {"type": "string"}, "description": "The DevRev IDs of the users who modified the work item"},
                "owned_by": {"type": "array", "items": {"type": "string"}, "description": "The DevRev IDs of the users who are assigned to the work item"},
                "stage": {"type": "string", "description": "The stage name of the work item. Use valid_stage_transition tool to get the list of valid stages you an update to."},
                "sprint": {"type": "string", "description": "The DevRev ID of the sprint to be assigned to an issue."},
                "subtype": {
                    "type": "object",
                    "properties": {
                        "drop": {"type": "boolean", "description": "If true, the subtype will be dropped from the work item. If false, the subtype will be added to the work item."},
                        "subtype": {"type": "string", "description": "The subtype value of the work item. Remember to use list_subtypes tool to get the list of valid subtypes."}
                    },
                    "required": ["drop"]
                }
            },
            "required": ["id", "type"],
        },
    ),
  • Helper utility function used by the handler to send authenticated POST requests to DevRev API endpoints.
    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. It states this is an update operation, implying mutation, but doesn't mention permissions required, whether changes are reversible, error handling, or response format. For a mutation tool with 10 parameters, this is a significant gap in transparency.

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 front-loads the core purpose without unnecessary elaboration. It uses minimal words to convey the essential action and resource, making it highly concise and well-structured.

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?

Given the complexity (10 parameters, nested objects, no output schema, and no annotations), the description is inadequate. It doesn't explain what fields can be updated, how partial updates work, or reference sibling tools like valid_stage_transition for guidance. For a mutation tool with rich input schema, more context is needed.

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?

The description adds no parameter-specific information beyond what the schema provides. With 50% schema description coverage (5 of 10 parameters have descriptions), the description doesn't compensate for undocumented parameters like 'title' or 'body'. Baseline is 3 since the schema does moderate lifting, but the description adds no value.

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 ('existing work item'), specifying it's for issues or tickets in DevRev. It distinguishes from sibling tools like create_work (creation vs. update) and update_part (different resource type), though it doesn't explicitly mention these distinctions.

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_work or update_part. It mentions the resource type but doesn't specify prerequisites (e.g., needing an existing work item ID) or contextual triggers for updates, leaving usage unclear.

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