Skip to main content
Glama
standardbeagle

Harvest MCP Server

harvest_list_projects

Retrieve and filter projects from Harvest time tracking system to manage project visibility and access client-specific data.

Instructions

List all projects with filtering options. Use about {"tool": "harvest_list_projects"} for detailed parameters and examples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
is_activeNoFilter by active status
client_idNoFilter by client ID
pageNoPage number
per_pageNoResults per page (max 100)

Implementation Reference

  • MCP server handler dispatches to HarvestClient.getProjects with tool arguments and formats response as JSON text content.
    case 'harvest_list_projects': const projects = await harvestClient.getProjects(typedArgs); return { content: [ { type: 'text', text: JSON.stringify(projects, null, 2), }, ], };
  • Tool definition with name, description, and input schema for MCP registration and validation.
    name: 'harvest_list_projects', description: 'List all projects with filtering options. Use about {"tool": "harvest_list_projects"} for detailed parameters and examples.', inputSchema: { type: 'object', properties: { is_active: { type: 'boolean', description: 'Filter by active status' }, client_id: { type: 'string', description: 'Filter by client ID' }, page: { type: 'number', description: 'Page number' }, per_page: { type: 'number', description: 'Results per page (max 100)' } } } },
  • Core implementation fetches projects from Harvest API endpoint /projects with built query parameters.
    async getProjects(options?: any) { const queryString = this.buildQueryString(options); return this.makeRequest(`/projects${queryString}`); }
  • src/index.ts:69-73 (registration)
    Registers all tools (including harvest_list_projects) for MCP listTools request handling.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: tools, }; });
  • Utility method builds query string from filter parameters used by getProjects.
    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}` : ''; }

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