Skip to main content
Glama
taiste

Harvest MCP Server

by taiste

get_user_details

Retrieve user details by providing a user ID. This tool is part of the Harvest MCP Server, which integrates with Harvest's time tracking API for managing time entries, projects, clients, and tasks.

Instructions

Retrieve details for a specific user.

Args:
    user_id: The ID of the user to retrieve

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYes

Implementation Reference

  • The handler function for the 'get_user_details' MCP tool. Registered via @mcp.tool() decorator. Fetches user details from the Harvest API endpoint 'users/{user_id}' using the shared harvest_request helper, formats response as indented JSON.
    @mcp.tool()
    async def get_user_details(user_id: int):
        """Retrieve details for a specific user.
    
        Args:
            user_id: The ID of the user to retrieve
        """
        response = await harvest_request(f"users/{user_id}")
        return json.dumps(response, indent=2)
  • Shared helper function used by get_user_details and other tools to make authenticated HTTP requests to the Harvest API.
    async def harvest_request(path, params=None, method="GET"):
        headers = {
            "Harvest-Account-Id": HARVEST_ACCOUNT_ID,
            "Authorization": f"Bearer {HARVEST_API_KEY}",
            "User-Agent": "Harvest MCP Server",
            "Content-Type": "application/json",
        }
    
        url = f"https://api.harvestapp.com/v2/{path}"
    
        async with httpx.AsyncClient() as client:
            if method == "GET":
                response = await client.get(url, headers=headers, params=params)
            else:
                response = await client.request(method, url, headers=headers, json=params)
    
            if response.status_code != 200:
                raise Exception(
                    f"Harvest API Error: {response.status_code} {response.text}"
                )
    
            return response.json()
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 states this is a retrieval operation but doesn't mention whether it requires authentication, what permissions are needed, whether it's idempotent, what happens if the user_id doesn't exist, or what format/details are returned. 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences that directly address purpose and parameters. The 'Args:' section is clearly structured, though the formatting could be more integrated. Every sentence serves a purpose with minimal waste.

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, no output schema, and only basic schema coverage, the description is incomplete. It doesn't explain what 'details' are returned, how errors are handled, or any behavioral characteristics. While it covers the parameter meaning adequately, it leaves too many contextual gaps for effective tool selection and invocation.

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 description adds meaningful context for the single parameter 'user_id' by specifying it's 'The ID of the user to retrieve'. With 0% schema description coverage (the schema only provides title and type), this description compensates well by explaining what the parameter represents. However, it doesn't provide format examples or constraints beyond what's implied.

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 ('Retrieve') and resource ('details for a specific user'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_users' or 'get_client_details', which would require mentioning it fetches detailed information for a single user rather than listing multiple users or retrieving different entity types.

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_user_details' over 'list_users' for user information, or how it differs from other 'get_*_details' tools for different entities. There's also no information about prerequisites or context for 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

Related 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/taiste/harvest-mcp-server'

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