Skip to main content
Glama

delete_project

Archive a Harvest project to make it inactive while preserving historical data for time tracking records.

Instructions

Delete (archive) a project. This action archives the project rather than permanently deleting it, preserving historical data while making it inactive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesThe ID of the project to delete

Implementation Reference

  • The DeleteProjectHandler class implements the logic for the delete_project tool, which calls the Harvest API to delete/archive a project.
    class DeleteProjectHandler 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, 'delete project');
          
          logger.info('Deleting project via Harvest API', { projectId: project_id });
          await this.config.harvestClient.deleteProject(project_id);
          
          return {
            content: [{ type: 'text', text: JSON.stringify({ message: `Project ${project_id} deleted successfully` }, null, 2) }],
          };
        } catch (error) {
          return handleMCPToolError(error, 'delete_project');
        }
  • The delete_project tool is registered with its description, input schema, and handler instance.
    tool: {
      name: 'delete_project',
      description: 'Delete (archive) a project. This action archives the project rather than permanently deleting it, preserving historical data while making it inactive.',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: { type: 'number', description: 'The ID of the project to delete' },
        },
        required: ['project_id'],
        additionalProperties: false,
      },
    },
    handler: new DeleteProjectHandler(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