Skip to main content
Glama
devrev

DevRev MCP Server

Official
by devrev

create_part

Create a new enhancement in DevRev by specifying type, name, assigned users, parent parts, and description.

Instructions

Create a new part (enhancement) in DevRev

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes
nameYes
owned_byYesThe DevRev IDs of the users assigned to the part
parent_partYesThe DevRev IDs of the parent parts
descriptionNoThe description of the part

Implementation Reference

  • Handler function for executing the 'create_part' tool. Validates input arguments, builds the payload, calls the DevRev API 'parts.create' endpoint, and returns success or error message.
    elif name == "create_part":
        if not arguments:
            raise ValueError("Missing arguments")
    
        payload = {}
    
        type = arguments.get("type")
        if not type:
            raise ValueError("Missing type parameter")
        payload["type"] = type
    
        part_name = arguments.get("name")
        if not part_name:
            raise ValueError("Missing name parameter")
        payload["name"] = part_name
    
        owned_by = arguments.get("owned_by")
        if not owned_by:
            raise ValueError("Missing owned_by parameter")
        payload["owned_by"] = owned_by
    
        parent_part = arguments.get("parent_part")
        if not parent_part:
            raise ValueError("Missing parent_part parameter")
        payload["parent_part"] = parent_part
    
        description = arguments.get("description")
        if description:
            payload["description"] = description
    
        response = make_devrev_request(
            "parts.create",
            payload
        )
    
        if response.status_code != 201:
            error_text = response.text
            return [
                types.TextContent(
                    type="text",
                    text=f"Create part failed with status {response.status_code}: {error_text}"
                )
            ]
        
        return [
            types.TextContent(
                type="text",
                text=f"Part created successfully: {response.json()}"
            )
        ]
  • Registration of the 'create_part' tool in the list_tools handler, including name, description, and JSON schema for input validation.
        name="create_part",
        description="Create a new part (enhancement) in DevRev",
        inputSchema={
            "type": "object",
            "properties": {
                "type": {"type": "string", "enum": ["enhancement"]},
                "name": {"type": "string"},
                "owned_by": {"type": "array", "items": {"type": "string"}, "description": "The DevRev IDs of the users assigned to the part"},
                "parent_part": {"type": "array", "items": {"type": "string"}, "description": "The DevRev IDs of the parent parts"},
                "description": {"type": "string", "description": "The description of the part"},
            },
            "required": ["type", "name", "owned_by", "parent_part"],
        },
    ),
  • Utility function used by the create_part handler to make authenticated POST requests to DevRev API endpoints, including 'parts.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
        ) 
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions creation but lacks details on permissions needed, whether it's idempotent, error handling, or what happens on success/failure. For a mutation tool, 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 directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, making it easy for an agent to parse 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?

For a creation tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It lacks behavioral context, usage guidelines, and details on return values or side effects, which are critical for an agent to invoke it correctly.

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 60%, with descriptions for 'owned_by', 'parent_part', and 'description'. The tool description adds no parameter semantics beyond the schema, but the baseline is 3 since schema coverage is moderate and the description doesn't compensate or contradict.

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 ('Create') and resource ('new part (enhancement) in DevRev'), making the purpose unambiguous. It doesn't explicitly differentiate from siblings like 'create_work' or 'update_part', but the specificity of 'part (enhancement)' provides some implicit distinction.

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?

No guidance is provided on when to use this tool versus alternatives like 'create_work' or 'update_part'. The description states what it does but offers no context about prerequisites, appropriate scenarios, or exclusions, leaving the agent to infer usage.

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