Skip to main content
Glama
taiste

Harvest MCP Server

by taiste

list_clients

Retrieve active or inactive clients from the Harvest MCP Server using optional filtering to efficiently manage and organize client data.

Instructions

List clients with optional filtering.

Args:
    is_active: Pass true to only return active clients and false to return inactive clients

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
is_activeNo

Implementation Reference

  • The handler function that implements the list_clients tool. It constructs parameters based on the is_active filter and calls the shared harvest_request helper to fetch clients from the Harvest API, returning the JSON response.
    async def list_clients(is_active: bool = None):
        """List clients with optional filtering.
    
        Args:
            is_active: Pass true to only return active clients and false to return inactive clients
        """
        params = {}
        if is_active is not None:
            params["is_active"] = "true" if is_active else "false"
    
        response = await harvest_request("clients", params)
        return json.dumps(response, indent=2)
  • The @mcp.tool() decorator registers the list_clients function as an MCP tool.
    @mcp.tool()
  • Shared helper function used by list_clients (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 mentions optional filtering but doesn't describe return format, pagination, sorting, authentication requirements, rate limits, or what 'list' entails (e.g., all fields vs. summary). The description is minimal and lacks critical behavioral context for a tool with mutation siblings.

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 brief with two sentences and a parameter explanation section. It's front-loaded with the main purpose and efficiently documents the parameter. No wasted words, though the structure could be slightly improved by integrating the parameter explanation more seamlessly.

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?

Given no annotations, no output schema, and siblings that include mutation tools, the description is incomplete. It doesn't address return values, error conditions, or how this read operation fits with write operations like 'create_time_entry'. For a list tool in a system with time tracking and project management, more context about client relationships 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 description adds meaningful context for the single parameter 'is_active' by explaining what true/false values return, which compensates for the 0% schema description coverage. It clarifies the parameter's purpose beyond the schema's basic type information, though it doesn't cover default behavior when null.

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 'clients', making the purpose specific and understandable. It distinguishes from siblings like 'get_client_details' by focusing on listing rather than retrieving details. However, it doesn't explicitly differentiate from other list tools like 'list_projects' or 'list_users' beyond the resource name.

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 use 'list_clients' over 'get_client_details' for detailed client information, or how it relates to other list tools. There are no prerequisites, exclusions, or context for usage decisions.

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