Skip to main content
Glama
kpsunil97

DevRev MCP Server

by kpsunil97

get_object

Retrieve comprehensive details about any DevRev object by providing its unique identifier. Use this tool to access object information from the DevRev platform through the MCP server.

Instructions

Get all information about a DevRev object using its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • Handler logic for executing the 'get_object' tool. It extracts the object ID from arguments, calls the DevRev 'works.get' API endpoint, handles HTTP errors, and returns the object details as text content.
    elif name == "get_object":
        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}"
                )
            ]
        
        object_info = response.json()
        return [
            types.TextContent(
                type="text",
                text=f"Object information for '{id}':\n{object_info}"
            )
        ]
  • Tool registration in the list_tools handler, defining the name, description, and input schema (requiring 'id' as string).
    types.Tool(
        name="get_object",
        description="Get all information about a DevRev object using its ID",
        inputSchema={
            "type": "object",
            "properties": {
                "id": {"type": "string"},
            },
            "required": ["id"],
        },
    )
  • Utility function to perform authenticated POST requests to DevRev API endpoints, used by the get_object handler to fetch object details.
    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/internal/{endpoint}",
            headers=headers,
            json=payload
        ) 
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states this is a read operation ('Get'), but doesn't disclose behavioral traits like authentication needs, rate limits, error handling, or what 'all information' entails. For a tool with zero annotation coverage, 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 any wasted words. It's appropriately sized for a simple tool, making it easy to parse and understand quickly.

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 tool's simplicity (1 parameter, no output schema, no annotations), the description is minimal. It states the basic action but lacks details on return values, error cases, or operational context. Without annotations or output schema, the description should provide more completeness for effective use, but it falls short.

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 0%, so the description must compensate. It adds meaning by specifying that the 'id' parameter is for a 'DevRev object,' which clarifies the context beyond the schema's generic string type. However, it doesn't detail format, constraints, or examples, leaving some ambiguity. With one parameter, the baseline is higher, but incomplete coverage limits the score.

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 ('Get') and resource ('DevRev object') with the specific mechanism ('using its ID'). It distinguishes from the sibling 'search' tool by focusing on retrieval by ID rather than searching. However, it doesn't specify what type of information is returned beyond 'all information,' which keeps 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 object ID, contrasting with the 'search' sibling for broader queries. However, it lacks explicit guidance on when to use this versus alternatives, prerequisites, or exclusions, leaving usage context somewhat inferred rather than clearly stated.

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

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