get_project
Retrieve a specific project by ID to access client details, budget settings, billing configuration, and project dates from Harvest time tracking.
Instructions
Retrieve a specific project by its ID. Returns complete project details including client information, budget settings, billing configuration, and project dates.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The ID of the project to retrieve |
Implementation Reference
- src/tools/projects.ts:43-61 (handler)The GetProjectHandler class executes the tool logic, which validates the project_id input and fetches project data via the Harvest client.
class GetProjectHandler implements ToolHandler { constructor(private readonly config: BaseToolConfig) {} async execute(args: Record<string, any>): Promise<CallToolResult> { try { const inputSchema = z.object({ project_id: z.number().int().positive() }); const { project_id } = validateInput(inputSchema, args, 'get project'); logger.info('Fetching project from Harvest API', { projectId: project_id }); const project = await this.config.harvestClient.getProject(project_id); return { content: [{ type: 'text', text: JSON.stringify(project, null, 2) }], }; } catch (error) { return handleMCPToolError(error, 'get_project'); } } } - src/tools/projects.ts:224-238 (registration)The get_project tool is registered within the registerProjectTools function, linking its name, description, and input schema to the GetProjectHandler.
{ tool: { name: 'get_project', description: 'Retrieve a specific project by its ID. Returns complete project details including client information, budget settings, billing configuration, and project dates.', inputSchema: { type: 'object', properties: { project_id: { type: 'number', description: 'The ID of the project to retrieve' }, }, required: ['project_id'], additionalProperties: false, }, }, handler: new GetProjectHandler(config), },