Skip to main content
Glama
jakedx6

Helios-9 MCP Server

by jakedx6

duplicate_project

Copy an existing project to create a new version with customizable options for tasks, documents, dates, and ownership.

Instructions

Create a copy of an existing project with customizable options

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_project_idYesID of the project to duplicate
new_nameYesName for the new project
include_tasksNoWhether to copy tasks
include_documentsNoWhether to copy documents
reset_datesNoWhether to reset all dates to current
new_owner_idNoNew owner for the duplicated project (optional)

Implementation Reference

  • The main handler function that implements the duplicate_project tool. It copies the source project, optionally copies tasks and documents, handles date resets, and returns the results.
    export const duplicateProject = requireAuth(async (args: any) => {
      const { source_project_id, new_name, include_tasks, include_documents, reset_dates, new_owner_id } = DuplicateProjectSchema.parse(args)
      
      logger.info('Duplicating project', { source_project_id, new_name, include_tasks, include_documents })
    
      // Get source project
      const sourceProject = await supabaseService.getProject(source_project_id)
      if (!sourceProject) {
        throw new Error('Source project not found')
      }
    
      const now = new Date().toISOString()
      
      // Create new project
      const newProject = await supabaseService.createProject({
        name: new_name,
        description: `Copy of ${sourceProject.name}${sourceProject.description ? `: ${sourceProject.description}` : ''}`,
        status: 'active'
        // Removed owner_id, priority, visibility, metadata as they don't exist in the database schema
      })
    
      const duplicateResults = {
        new_project: newProject,
        tasks_copied: 0,
        documents_copied: 0
      }
    
      // Copy tasks if requested
      if (include_tasks) {
        const sourceTasks = await supabaseService.getTasks({ project_id: source_project_id })
        
        for (const task of sourceTasks) {
          const newTask = {
            title: task.title,
            description: task.description,
            project_id: newProject.id,
            initiative_id: null,
            status: 'todo' as const, // Reset all tasks to todo
            priority: task.priority,
            due_date: reset_dates ? null : task.due_date,
            assignee_id: task.assignee_id
            // Removed started_at, completed_at as they don't exist in the database schema
          }
          
          await supabaseService.createTask(newTask)
          duplicateResults.tasks_copied++
        }
      }
    
      // Copy documents if requested
      if (include_documents) {
        const sourceDocuments = await supabaseService.getDocuments({ project_id: source_project_id })
        
        for (const doc of sourceDocuments) {
          const newDoc = {
            project_id: newProject.id,
            title: `${doc.title} (Copy)`,
            content: doc.content,
            document_type: doc.document_type
            // Removed metadata as it doesn't exist in the database schema
          }
          
          await supabaseService.createDocument(newDoc)
          duplicateResults.documents_copied++
        }
      }
    
      return duplicateResults
    })
  • Zod input schema for validating parameters of the duplicate_project tool.
    const DuplicateProjectSchema = z.object({
      source_project_id: z.string().min(1),
      new_name: z.string().min(1).max(200),
      include_tasks: z.boolean().default(true),
      include_documents: z.boolean().default(true),
      reset_dates: z.boolean().default(true),
      new_owner_id: z.string().optional()
    })
  • MCPTool registration defining the duplicate_project tool, including its name, description, and input schema for the protocol.
    export const duplicateProjectTool: MCPTool = {
      name: 'duplicate_project',
      description: 'Create a copy of an existing project with customizable options',
      inputSchema: {
        type: 'object',
        properties: {
          source_project_id: {
            type: 'string',
            description: 'ID of the project to duplicate'
          },
          new_name: {
            type: 'string',
            description: 'Name for the new project'
          },
          include_tasks: {
            type: 'boolean',
            default: true,
            description: 'Whether to copy tasks'
          },
          include_documents: {
            type: 'boolean',
            default: true,
            description: 'Whether to copy documents'
          },
          reset_dates: {
            type: 'boolean',
            default: true,
            description: 'Whether to reset all dates to current'
          },
          new_owner_id: {
            type: 'string',
            description: 'New owner for the duplicated project (optional)'
          }
        },
        required: ['source_project_id', 'new_name']
      }
    }
  • Handler registration object that maps 'duplicate_project' to the duplicateProject function.
    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
  • Collection of all project tools including duplicateProjectTool for bulk registration.
    export const projectTools = {
      listProjectsTool,
      getProjectTool,
      createProjectTool,
      updateProjectTool,
      getProjectContextTool,
      archiveProjectTool,
      duplicateProjectTool,
      getProjectTimelineTool,
      bulkUpdateProjectsTool
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states 'create a copy' which implies a write operation, but doesn't disclose behavioral traits like permissions required, whether the original is affected, rate limits, error conditions, or what the output looks like. For a mutation tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. Every word earns its place: 'Create a copy' (action), 'of an existing project' (resource), 'with customizable options' (scope). There's no waste or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (mutation with 6 parameters) and lack of annotations or output schema, the description is incomplete. It doesn't explain what the tool returns, error handling, side effects, or prerequisites. For a tool that creates new resources, more context is needed to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 6 parameters. The description adds minimal value beyond the schema by mentioning 'customizable options', which aligns with the boolean parameters for inclusion/reset. However, it doesn't provide additional semantics like default behaviors or usage examples beyond what's in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Create a copy of an existing project with customizable options'. It specifies the verb ('create a copy'), resource ('existing project'), and scope ('customizable options'). However, it doesn't explicitly differentiate from sibling tools like 'create_project' or 'bulk_update_projects', which would require a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when duplication is appropriate (e.g., for templates, testing, or branching workflows) or when to use 'create_project' instead. There's no explicit context, exclusions, or named alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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