Skip to main content
Glama
standardbeagle

Harvest MCP Server

harvest_list_time_entries

Retrieve time entries from Harvest with filters for user, project, date range, and pagination to track work hours and manage time data.

Instructions

List time entries with optional filters. Use about {"tool": "harvest_list_time_entries"} for detailed usage examples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idNoFilter by user ID
project_idNoFilter by project ID
fromNoStart date (YYYY-MM-DD)
toNoEnd date (YYYY-MM-DD)
pageNoPage number
per_pageNoResults per page (max 100)

Implementation Reference

  • Core handler function that builds query parameters from input options and makes an authenticated GET request to the Harvest API /time_entries endpoint to list time entries with optional filters.
    async getTimeEntries(options?: any) {
      const queryString = this.buildQueryString(options);
      return this.makeRequest(`/time_entries${queryString}`);
    }
  • Tool definition including name, description, and input schema for validation and MCP tool listing.
    {
      name: 'harvest_list_time_entries',
      description: 'List time entries with optional filters. Use about {"tool": "harvest_list_time_entries"} for detailed usage examples.',
      inputSchema: {
        type: 'object',
        properties: {
          user_id: { type: 'string', description: 'Filter by user ID' },
          project_id: { type: 'string', description: 'Filter by project ID' },
          from: { type: 'string', description: 'Start date (YYYY-MM-DD)' },
          to: { type: 'string', description: 'End date (YYYY-MM-DD)' },
          page: { type: 'number', description: 'Page number' },
          per_page: { type: 'number', description: 'Results per page (max 100)' }
        }
      }
    },
  • src/index.ts:83-92 (registration)
    MCP CallToolRequest dispatch case that invokes the handler and formats the response as MCP content.
    case 'harvest_list_time_entries':
      const timeEntries = await harvestClient.getTimeEntries(typedArgs);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(timeEntries, null, 2),
          },
        ],
      };
  • src/index.ts:69-73 (registration)
    Registers the tools list including harvest_list_time_entries schema for MCP ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: tools,
      };
    });
  • Helper function to construct URL query string from filter parameters used by getTimeEntries.
    private buildQueryString(params?: Record<string, any>): string {
      if (!params) return '';
      
      const queryParams = new URLSearchParams();
      Object.entries(params).forEach(([key, value]) => {
        if (value !== undefined && value !== null) {
          queryParams.append(key, String(value));
        }
      });
      
      const queryString = queryParams.toString();
      return queryString ? `?${queryString}` : '';
    }
    
    // Time Entries
    async getTimeEntries(options?: any) {
      const queryString = this.buildQueryString(options);
      return this.makeRequest(`/time_entries${queryString}`);
    }
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. It mentions 'optional filters' and hints at pagination via parameters, but fails to describe key behaviors such as rate limits, authentication requirements, error handling, or the format of returned data. For a list tool with 6 parameters, this leaves significant gaps in understanding how the tool operates beyond basic filtering.

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 concise with two sentences: the first states the purpose, and the second directs to another tool for examples. It's front-loaded with the core functionality. However, the second sentence is somewhat redundant as it doesn't add operational value, slightly reducing efficiency.

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 tool with 6 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain return values, pagination behavior, or error cases, leaving the agent with insufficient context to use the tool effectively. The reference to 'about' for examples doesn't compensate for these gaps in the description itself.

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

Parameters3/5

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

Schema description coverage is 100%, so the input schema fully documents all 6 parameters with clear descriptions. The description adds no additional parameter semantics beyond stating 'optional filters,' which is already implied by the schema. This meets the baseline of 3, as the schema handles the heavy lifting, but the description doesn't compensate or add extra meaning.

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 filters,' which specifies the verb ('List') and resource ('time entries'). It distinguishes itself from siblings like 'harvest_create_time_entry' or 'harvest_update_time_entry' by focusing on listing rather than mutating. However, it doesn't explicitly differentiate from other list tools like 'harvest_list_projects' or 'harvest_list_users,' which slightly reduces specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description implies usage for listing time entries with filters, but it lacks explicit guidance on when to use this tool versus alternatives. For example, it doesn't specify if this is for general queries or if 'harvest_time_report' might be better for aggregated data. The reference to 'about' for examples provides some context, but no clear when/when-not rules are stated.

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/standardbeagle/harvest-mcp'

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