Skip to main content
Glama
taiste

Harvest MCP Server

by taiste

list_time_entries

Retrieve filtered time entries by user ID, date range, or running status using the Harvest MCP Server. Streamline time tracking data management.

Instructions

List time entries with optional filtering.

Args:
    user_id: Filter by user ID
    from_date: Only return time entries with a spent_date on or after the given date (YYYY-MM-DD)
    to_date: Only return time entries with a spent_date on or before the given date (YYYY-MM-DD)
    is_running: Pass true to only return running time entries and false to return non-running time entries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_dateNo
is_runningNo
to_dateNo
user_idNo

Implementation Reference

  • The handler function for the 'list_time_entries' tool, decorated with @mcp.tool() for registration. It constructs query parameters based on input arguments and calls the Harvest API via the helper function to fetch time entries, returning the JSON response.
    @mcp.tool()
    async def list_time_entries(
        user_id: int = None,
        from_date: str = None,
        to_date: str = None,
        is_running: bool = None,
        is_billable: bool = None,
    ):
        """List time entries with optional filtering.
    
        Args:
            user_id: Filter by user ID
            from_date: Only return time entries with a spent_date on or after the given date (YYYY-MM-DD)
            to_date: Only return time entries with a spent_date on or before the given date (YYYY-MM-DD)
            is_running: Pass true to only return running time entries and false to return non-running time entries
            is_billable: Pass true to only return billable time entries and false to return non-billable time entries
        """
        params = {}
        if user_id is not None:
            params["user_id"] = str(user_id)
        if from_date is not None:
            params["from"] = from_date
        if to_date is not None:
            params["to"] = to_date
        if is_running is not None:
            params["is_running"] = "true" if is_running else "false"
        if is_billable is not None:
            params["is_billable"] = "true" if is_billable else "false"
    
        response = await harvest_request("time_entries", params)
        return json.dumps(response, indent=2)
  • Helper function used by list_time_entries (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 the full burden of behavioral disclosure. It mentions optional filtering but fails to describe critical behaviors like pagination, rate limits, authentication requirements, or the format of returned data. This leaves significant gaps for a tool that likely returns multiple entries.

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 a clear purpose statement followed by parameter details. It avoids unnecessary fluff, though the parameter explanations could be slightly more integrated into the flow rather than listed as bullet points.

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 the complexity of a list operation with filtering, no annotations, and no output schema, the description is incomplete. It lacks information on return format, pagination, error handling, or how results are ordered, which are essential for an agent to use this tool effectively.

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 substantial value beyond the input schema, which has 0% schema description coverage. It clearly explains the semantics of all four parameters (user_id, from_date, to_date, is_running), including date format (YYYY-MM-DD) and boolean usage, fully compensating for the schema's lack of descriptions.

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 as 'List time entries with optional filtering,' which is a specific verb+resource combination. However, it doesn't explicitly differentiate this tool from potential sibling tools like 'list_tasks' or 'list_users,' which reduces it from 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 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 sibling tools like 'list_clients' or 'list_projects,' nor does it specify prerequisites or exclusions for filtering time entries, leaving the agent without contextual usage instructions.

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