add_timeline_entry
Track progress by adding updates to a work item or enhancement via a timeline entry using the specified ID and entry details.
Instructions
Add a timeline entry to a work item (issue, ticket) or part (enhancement)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The DevRev ID of the work item (issue, ticket) or part (enhancement) | |
| timeline_entry | Yes | The timeline entry about updates to the work item (issue, ticket) or part (enhancement). |
Implementation Reference
- src/devrev_mcp/server.py:1262-1296 (handler)Handler function that implements the logic for the 'add_timeline_entry' tool by making a POST request to the DevRev 'timeline-entries.create' endpoint.elif name == "add_timeline_entry": if not arguments: raise ValueError("Missing arguments") payload = {"type": "timeline_comment"} id = arguments.get("id") if not id: raise ValueError("Missing id parameter") payload["object"] = id timeline_entry = arguments.get("timeline_entry") if not timeline_entry: raise ValueError("Missing timeline_entry parameter") payload["body"] = timeline_entry timeline_response = make_devrev_request( "timeline-entries.create", payload ) if timeline_response.status_code != 201: error_text = timeline_response.text return [ types.TextContent( type="text", text=f"Create timeline entry failed with status {timeline_response.status_code}: {error_text}" ) ] return [ types.TextContent( type="text", text=f"Timeline entry created successfully: {timeline_response.json()}" ) ]
- src/devrev_mcp/server.py:433-444 (registration)Tool registration in list_tools() including name, description, and input schema for 'add_timeline_entry'.types.Tool( name="add_timeline_entry", description="Add a timeline entry to a work item (issue, ticket) or part (enhancement)", inputSchema={ "type": "object", "properties": { "id": {"type": "string", "description": "The DevRev ID of the work item (issue, ticket) or part (enhancement)"}, "timeline_entry": {"type": "string", "description": "The timeline entry about updates to the work item (issue, ticket) or part (enhancement)."}, }, "required": ["id", "timeline_entry"], } ),
- src/devrev_mcp/server.py:437-443 (schema)JSON schema defining the input parameters for the 'add_timeline_entry' tool."type": "object", "properties": { "id": {"type": "string", "description": "The DevRev ID of the work item (issue, ticket) or part (enhancement)"}, "timeline_entry": {"type": "string", "description": "The timeline entry about updates to the work item (issue, ticket) or part (enhancement)."}, }, "required": ["id", "timeline_entry"], }
- src/devrev_mcp/utils.py:12-39 (helper)Helper utility function used in the handler to perform authenticated POST requests to DevRev API endpoints, specifically called with 'timeline-entries.create'.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 )