Skip to main content
Glama
taiste

Harvest MCP Server

by taiste

list_users

Retrieve and manage user data in Harvest accounts, filtering by active status and pagination. Simplify user oversight with precise query parameters for efficient account administration.

Instructions

List all users in your Harvest account.

Args:
    is_active: Pass true to only return active users and false to return inactive users
    page: The page number for pagination
    per_page: The number of records to return per page (1-2000)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
is_activeNo
pageNo
per_pageNo

Implementation Reference

  • The handler function for the 'list_users' tool, decorated with @mcp.tool() for registration. It constructs parameters based on inputs and calls the Harvest API via harvest_request to list users, returning JSON.
    @mcp.tool()
    async def list_users(is_active: bool = None, page: int = None, per_page: int = None):
        """List all users in your Harvest account.
    
        Args:
            is_active: Pass true to only return active users and false to return inactive users
            page: The page number for pagination
            per_page: The number of records to return per page (1-2000)
        """
        params = {}
        if is_active is not None:
            params["is_active"] = "true" if is_active else "false"
        else:
            params["is_active"] = "true"
        if page is not None:
            params["page"] = str(page)
        if per_page is not None:
            params["per_page"] = str(per_page)
        else:
            params["per_page"] = 200
    
        response = await harvest_request("users", params)
        return json.dumps(response, indent=2)
  • Helper function used by list_users to make authenticated 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()
Behavior3/5

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

With no annotations provided, the description carries the full burden. It implies a read-only operation ('List') but doesn't disclose behavioral traits such as authentication requirements, rate limits, or pagination details beyond parameter names. Some context is given (e.g., pagination parameters), but key aspects like response format or error handling are missing.

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 and front-loaded with the core purpose in the first sentence. The parameter explanations are concise and necessary, though the structure could be slightly improved by integrating guidelines to avoid a separate 'Args' section without additional context.

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 moderate complexity (3 parameters, no output schema, no annotations), the description is adequate but has gaps. It covers parameters well but lacks usage guidelines, behavioral details like authentication, and output information, making it minimally viable but not fully comprehensive.

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

Parameters5/5

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

The description adds significant meaning beyond the input schema, which has 0% coverage (no descriptions in schema). It explains each parameter's purpose: 'is_active' filters by user status, 'page' handles pagination, and 'per_page' specifies record limits with a range (1-2000). This fully compensates for the schema's lack of documentation.

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 ('List') and resource ('all users in your Harvest account'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_user_details' or 'list_clients', which would require a 5.

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 'get_user_details' for specific users or 'list_clients' for different resources. The description only states what the tool does without context for selection among siblings.

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