Skip to main content
Glama
devrev

DevRev MCP Server

Official
by devrev

get_current_user

Retrieve your DevRev user profile details to identify the current authenticated user within the platform.

Instructions

Fetch the current DevRev user details. When the user specifies 'me' in the query, this tool should be called to get the user details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The execution handler for the 'get_current_user' tool. It invokes the DevRev API 'dev-users.self' endpoint to fetch and return the current user's details as text content.
    if name == "get_current_user":
        response = make_devrev_request(
            "dev-users.self",
            {}
        )
    
        if response.status_code != 200:
            error_text = response.text
            return [
                types.TextContent(
                    type="text",
                    text=f"Get current user failed with status {response.status_code}: {error_text}"
                )
            ]
    
        return [
            types.TextContent(
                type="text",
                text=f"Current DevRev user details: {response.json()}"
            )
        ]
  • Registration of the 'get_current_user' tool in the list_tools() handler, defining its name, description, and input schema (empty object).
    types.Tool(
        name="get_current_user",
        description="Fetch the current DevRev user details. When the user specifies 'me' in the query, this tool should be called to get the user details.",
        inputSchema={"type": "object", "properties": {}},
    ),
  • JSON Schema for the 'get_current_user' tool input, which requires no parameters (empty properties).
    inputSchema={"type": "object", "properties": {}},
  • Helper utility function 'make_devrev_request' used by the handler to perform authenticated POST requests to the DevRev API, including for 'dev-users.self' 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
        ) 
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 of behavioral disclosure. While it states the tool fetches user details, it doesn't describe what details are returned, whether authentication is required, rate limits, or error conditions. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 perfectly concise with two sentences that each add clear value: the first states the purpose, and the second provides usage guidance. There's zero wasted text, and it's front-loaded with essential information.

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 (0 parameters, no output schema, no annotations), the description is adequate but has clear gaps. It explains when to use the tool but doesn't describe what user details are returned or any behavioral aspects. For a tool that fetches data, more information about the return format would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, which is correct for this case. A baseline of 4 is applied since the schema fully covers the lack of parameters.

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 tool's purpose with a specific verb ('Fetch') and resource ('current DevRev user details'), making it immediately understandable. However, it doesn't differentiate this tool from potential sibling user-related tools (though none are listed in the provided siblings), which prevents 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 Guidelines5/5

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

The description provides explicit usage guidance by stating 'When the user specifies 'me' in the query, this tool should be called to get the user details.' This clearly indicates the specific context for using this tool versus alternatives, which is excellent for agent decision-making.

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