Skip to main content
Glama
adrian-dotco

Harvest Natural Language Time Entry MCP Server

by adrian-dotco

list_entries

Retrieve recent time entries from Harvest by specifying date ranges to review tracked work hours and activities.

Instructions

List recent time entries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNoStart date (YYYY-MM-DD)
toNoEnd date (YYYY-MM-DD)

Implementation Reference

  • Handler for the 'list_entries' tool. Extracts optional 'from' and 'to' dates from arguments, queries the Harvest API for time entries, maps the response to a simplified format, and returns it as JSON text content.
    case 'list_entries': { const { from, to } = request.params.arguments as { from?: string; to?: string }; const params: Record<string, string> = {}; if (from) params.from = from; if (to) params.to = to; const response = await this.axiosInstance.get('/time_entries', { params }); return { content: [ { type: 'text', text: JSON.stringify(response.data.time_entries.map((e: { id: number; spent_date: string; hours: number; notes: string; project: { name: string }; task: { name: string } }) => ({ id: e.id, spent_date: e.spent_date, hours: e.hours, notes: e.notes, project: e.project.name, task: e.task.name, })), null, 2), }, ], }; }
  • src/index.ts:303-318 (registration)
    Registration of the 'list_entries' tool in the tools array, including its name, description, and input schema definition.
    name: 'list_entries', description: 'List recent time entries', inputSchema: { type: 'object', properties: { from: { type: 'string', description: 'Start date (YYYY-MM-DD)', }, to: { type: 'string', description: 'End date (YYYY-MM-DD)', }, }, }, },
  • Input schema for the 'list_entries' tool defining optional 'from' and 'to' date parameters.
    inputSchema: { type: 'object', properties: { from: { type: 'string', description: 'Start date (YYYY-MM-DD)', }, to: { type: 'string', description: 'End date (YYYY-MM-DD)', }, }, },

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/adrian-dotco/harvest-mcp-server'

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