Skip to main content
Glama

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
NameRequiredDescriptionDefault
project_idYesThe ID of the project to retrieve

Implementation Reference

  • 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');
        }
      }
    }
  • 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),
    },

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

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