Skip to main content
Glama
devrev

DevRev MCP Server

Official
by devrev

get_part

Retrieve enhancement details from DevRev by providing its unique ID to access specific part information.

Instructions

Get information about a part (enhancement) in DevRev using its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe DevRev ID of the part

Implementation Reference

  • The handler function within handle_call_tool that executes the 'get_part' tool. It extracts the 'id' argument, calls the DevRev API endpoint 'parts.get' using make_devrev_request, handles errors, and returns the part information as text content.
    elif name == "get_part":
        if not arguments:
            raise ValueError("Missing arguments")
    
        id = arguments.get("id")
        if not id:
            raise ValueError("Missing id parameter")
        
        response = make_devrev_request(
            "parts.get",
            {
                "id": id
            }
        )
    
        if response.status_code != 200:
            error_text = response.text
            return [
                types.TextContent(
                    type="text",
                    text=f"Get part failed with status {response.status_code}: {error_text}"
                )
            ]
        
        return [
            types.TextContent(
                type="text",
                text=f"Part information for '{id}':\n{response.json()}"
            )
        ]
  • Registers the 'get_part' tool in the list_tools handler, including its name, description, and input schema requiring a 'id' string.
    types.Tool(
        name="get_part",
        description="Get information about a part (enhancement) in DevRev using its ID",
        inputSchema={
            "type": "object",
            "properties": {"id": {"type": "string", "description": "The DevRev ID of the part"}},
            "required": ["id"],
        },
    ),
  • The JSON schema for the 'get_part' tool input, defining an object with a required 'id' property of type string.
    inputSchema={
        "type": "object",
        "properties": {"id": {"type": "string", "description": "The DevRev ID of the part"}},
        "required": ["id"],
    },
  • Helper utility function used by the get_part handler to make authenticated POST requests to the DevRev API, specifically called with endpoint 'parts.get'.
    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 full burden but offers minimal behavioral insight. It states it retrieves information but doesn't disclose what kind of information is returned, error conditions, authentication needs, or rate limits. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple lookup tool and front-loads the essential information.

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?

For a tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what information is returned about the part, potential error responses, or how it integrates with the DevRev system. Given the lack of structured data, the description should provide more context about the tool's behavior and outputs.

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%, so the schema already documents the single 'id' parameter thoroughly. The description adds no additional meaning about the parameter beyond what's in the schema (e.g., format examples, validation rules, or context about DevRev IDs). This meets the baseline for high schema coverage.

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 information about') and resource ('a part (enhancement) in DevRev'), making the purpose understandable. It specifies retrieval by ID, which distinguishes it from list_parts that likely returns multiple items. However, it doesn't explicitly contrast with sibling tools like get_work or update_part, 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 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. It doesn't mention when to choose get_part over list_parts for single-item retrieval, or how it differs from get_work for different resource types. There's no context about prerequisites or typical use cases.

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