Skip to main content
Glama
jakedx6

Helios-9 MCP Server

by jakedx6

archive_project

Archive or unarchive a project in Helios-9 by specifying its ID and reason, managing project lifecycle and organization.

Instructions

Archive or unarchive a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesID of the project to archive/unarchive
archiveNoTrue to archive, false to unarchive
reasonNoReason for archiving/unarchiving

Implementation Reference

  • The main handler function for the archive_project tool. Parses arguments with Zod schema, updates project status to 'archived' or 'active', logs activity, and optionally marks associated tasks as done when archiving.
    export const archiveProject = requireAuth(async (args: any) => {
      const { project_id, archive, reason } = ArchiveProjectSchema.parse(args)
      
      logger.info(`${archive ? 'Archiving' : 'Unarchiving'} project`, { project_id, reason })
    
      const updates: any = {
        status: archive ? 'archived' : 'active',
        updated_at: new Date().toISOString()
      }
    
      // metadata field doesn't exist in the database schema
    
      const result = await supabaseService.updateProject(project_id, updates)
      
      if (archive) {
        // Mark all associated tasks as done when archiving project
        await supabaseService.updateTasksByProject(project_id, { 
          status: 'done',
          updated_at: new Date().toISOString()
        })
      }
    
      return {
        success: true,
        action: archive ? 'archived' : 'unarchived',
        project: result,
        affected_tasks: archive ? 'All project tasks archived' : 'Tasks remain as-is'
      }
    })
  • MCPTool registration object defining the 'archive_project' tool with name, description, and JSON input schema.
    export const archiveProjectTool: MCPTool = {
      name: 'archive_project',
      description: 'Archive or unarchive a project',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: {
            type: 'string',
            description: 'ID of the project to archive/unarchive'
          },
          archive: {
            type: 'boolean',
            default: true,
            description: 'True to archive, false to unarchive'
          },
          reason: {
            type: 'string',
            description: 'Reason for archiving/unarchiving'
          }
        },
        required: ['project_id']
      }
    }
  • Zod schema used internally for parsing and validating input arguments in the handler.
    const ArchiveProjectSchema = z.object({
      project_id: z.string().min(1),
      archive: z.boolean().default(true),
      reason: z.string().optional()
    })
  • Central registry mapping tool names to their handler functions, including 'archive_project' to archiveProject.
    export const projectHandlers = {
      list_projects: listProjects,
      get_project: getProject,
      create_project: createProject,
      update_project: updateProject,
      get_project_context: getProjectContext,
      archive_project: archiveProject,
      duplicate_project: duplicateProject,
      get_project_timeline: getProjectTimeline,
      bulk_update_projects: bulkUpdateProjects
    }
  • Export of all project MCPTool objects, including archiveProjectTool.
    export const projectTools = {
      listProjectsTool,
      getProjectTool,
      createProjectTool,
      updateProjectTool,
      getProjectContextTool,
      archiveProjectTool,
      duplicateProjectTool,
      getProjectTimelineTool,
      bulkUpdateProjectsTool
    }

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/jakedx6/helios9-MCP-Server'

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