Skip to main content
Glama
devrev

DevRev MCP Server

Official
by devrev

get_work

Retrieve detailed information about a DevRev work item, such as an issue or ticket, by specifying its unique ID. This tool simplifies access to essential data for efficient tracking and management.

Instructions

Get all information about a DevRev work item (issue, ticket) using its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe DevRev ID of the work item

Implementation Reference

  • Handler logic for the 'get_work' tool within the unified handle_call_tool function. Extracts the work item ID from arguments, makes an API call to 'works.get' using make_devrev_request, and returns the response as text content or an error message.
    elif name == "get_work": if not arguments: raise ValueError("Missing arguments") id = arguments.get("id") if not id: raise ValueError("Missing id parameter") response = make_devrev_request( "works.get", { "id": id } ) if response.status_code != 200: error_text = response.text return [ types.TextContent( type="text", text=f"Get object failed with status {response.status_code}: {error_text}" ) ] return [ types.TextContent( type="text", text=f"Object information for '{id}':\n{response.json()}" ) ]
  • Input schema definition for the 'get_work' tool, specifying that it requires a single 'id' parameter of type string.
    name="get_work", description="Get all information about a DevRev work item (issue, ticket) using its ID", inputSchema={ "type": "object", "properties": { "id": {"type": "string", "description": "The DevRev ID of the work item"}, }, "required": ["id"], }, ),
  • Registration of the 'get_work' tool in the list_tools handler, providing name, description, and input schema.
    name="get_work", description="Get all information about a DevRev work item (issue, ticket) using its ID", inputSchema={ "type": "object", "properties": { "id": {"type": "string", "description": "The DevRev ID of the work item"}, }, "required": ["id"], }, ),
  • Helper utility function make_devrev_request used by the get_work handler to perform the actual API call to DevRev's 'works.get' endpoint.
    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 )

Other Tools

Related 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