Skip to main content
Glama
devrev

DevRev MCP Server

Official
by devrev

get_work

Retrieve detailed information about a DevRev work item (issue or ticket) by providing its unique ID to access all relevant data.

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

  • The handler function that executes the 'get_work' tool. It validates the input arguments, calls the DevRev API endpoint 'works.get' with the work item ID, handles errors, and returns the response as text content.
    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()}"
            )
        ]
  • Registration of the 'get_work' tool in the list_tools handler, including its name, description, and input schema for JSON Schema validation.
    types.Tool(
        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 called by the 'get_work' handler to perform the authenticated HTTP POST request to the DevRev API.
    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 it retrieves 'all information' but doesn't specify what that includes (e.g., fields, relationships), whether it's a read-only operation, error handling for invalid IDs, or performance aspects. This leaves significant gaps for a tool with no annotation support.

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, clear sentence with zero waste—it directly states the tool's purpose and key input. It's appropriately sized and front-loaded, making it easy to understand at a glance without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 parameter, 100% schema coverage, no output schema), the description is adequate for basic understanding but incomplete. It lacks details on return values (since no output schema), error cases, or behavioral traits, which are important for a retrieval tool with no annotations. It meets minimum viability but has clear gaps.

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?

Schema description coverage is 100%, with the single parameter 'id' documented as 'The DevRev ID of the work item'. The description adds minimal value by mentioning 'using its ID', reinforcing but not expanding beyond the schema. Baseline 3 is appropriate as the schema does the heavy lifting.

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 ('Get all information') and resource ('DevRev work item') with specific examples ('issue, ticket') and identifies the required input ('using its ID'). It distinguishes from siblings like 'list_works' or 'search' by focusing on retrieval of a single item by ID. However, it doesn't explicitly contrast with 'get_part' or 'update_work', keeping it from 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when you have a specific work item ID, suggesting it's for detailed retrieval rather than listing or searching. However, it lacks explicit guidance on when to use alternatives like 'list_works' for multiple items or 'search' for filtered queries, and doesn't mention prerequisites or exclusions, leaving some ambiguity.

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