create_object
Create and organize tasks, projects, epics, or features within the Task Trellis system. Define hierarchies, set priorities, statuses, and prerequisites to manage work items effectively.
Instructions
Creates a new object in the task trellis system
Use this tool to create new objects such as tasks, projects, or other work items within the task management hierarchy. Objects can have parent-child relationships and dependencies through prerequisites.
Available object types and hierarchy requirements:
'project': Top-level containers, cannot have a parent
'epic': Can have no parent or a project as a parent
'feature': Can have no parent or an epic as a parent
'task': Can have no parent or a feature as a parent
Supported hierarchy structures:
Full hierarchy: project → epic → feature → task
Simplified: epic → feature → task
Simplified: feature → task
Standalone: epic
Standalone: task
Available status values:
'draft': Initial state for new objects
'open': Ready to begin work (default)
'open': Ready to begin work
'in-progress': Currently being worked on
'done': Completed successfully
'wont-do': Cancelled or decided against
Available priority values:
'high': Critical or urgent work
'medium': Standard priority (default)
'low': Nice-to-have or future work
Key aspects:
Objects support hierarchical organization via parent relationships
Prerequisites define execution order dependencies between objects
Parent-child relationships must follow the hierarchy rules above
The system validates parent types during creation
Best practices:
Use descriptive titles that clearly indicate the work to be done
Follow the hierarchy constraints for proper organization
Set appropriate status based on current work state
Define prerequisites to ensure proper task ordering
Include detailed descriptions to provide context for the work
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | No | Description of the object | |
| parent | No | Parent object ID (optional) | |
| prerequisites | No | Array of prerequisite object IDs (defaults to empty array) | |
| priority | No | Priority level (defaults to 'medium') | medium |
| status | No | Status of the object (defaults to 'open') | open |
| title | Yes | Title of the object | |
| type | Yes | Type of object to create |
Input Schema (JSON Schema)
Implementation Reference
- src/tools/createObjectTool.ts:96-130 (handler)Handler function that executes the create object logic for the MCP tool 'create_issue' by parsing arguments and delegating to TaskTrellisService.createObjectexport async function handleCreateObject( service: TaskTrellisService, repository: Repository, args: unknown, ) { const { type, title, parent, priority = "medium", status = "open", prerequisites = [], description = "", } = args as { type: string; title: string; parent?: string; priority?: string; status?: string; prerequisites?: string[]; description?: string; }; // Delegate to service layer return service.createObject( repository, type as TrellisObjectType, title, parent, priority as TrellisObjectPriority, status as TrellisObjectStatus, prerequisites, description, ); }
- src/tools/createObjectTool.ts:9-94 (schema)Tool definition for 'create_issue' (create_object functionality) including name, description, and input schema for validationexport const createObjectTool = { name: "create_issue", description: `Creates a new issue in the task trellis system Use this tool to create new issues such as tasks, projects, or other work items within the task management hierarchy. Issues can have parent-child relationships and dependencies through prerequisites. Available issue types and hierarchy requirements: - 'project': Top-level containers, cannot have a parent - 'epic': Can have no parent or a project as a parent - 'feature': Can have no parent or an epic as a parent - 'task': Can have no parent or a feature as a parent Supported hierarchy structures: - Full hierarchy: project → epic → feature → task - Simplified: epic → feature → task - Simplified: feature → task - Standalone: epic - Standalone: task Available status values: - 'draft': Initial state for new issues - 'open': Ready to begin work (default) - 'open': Ready to begin work - 'in-progress': Currently being worked on - 'done': Completed successfully - 'wont-do': Cancelled or decided against Available priority values: - 'high': Critical or urgent work - 'medium': Standard priority (default) - 'low': Nice-to-have or future work Key aspects: - Issues support hierarchical organization via parent relationships - Prerequisites define execution order dependencies between issues - Parent-child relationships must follow the hierarchy rules above - The system validates parent types during creation Best practices: - Use descriptive titles that clearly indicate the work to be done - Follow the hierarchy constraints for proper organization - Set appropriate status based on current work state - Define prerequisites to ensure proper task ordering - Include detailed descriptions to provide context for the work`, inputSchema: { type: "object", properties: { type: { type: "string", description: "Type of issue to create", }, title: { type: "string", description: "Title of the issue", }, parent: { type: "string", description: "Parent issue ID (optional)", }, priority: { type: "string", description: "Priority level (defaults to 'medium')", default: "medium", }, status: { type: "string", description: "Status of the issue (defaults to 'open')", default: "open", }, prerequisites: { type: "array", items: { type: "string", }, description: "Array of prerequisite issue IDs (defaults to empty array)", default: [], }, description: { type: "string", description: "Description of the issue", }, }, required: ["type", "title"], }, } as const;
- src/server.ts:256-257 (registration)Tool registration in server request handler: maps 'create_issue' tool calls to handleCreateObjectcase "create_issue": return handleCreateObject(_getService(), repository, args);
- src/server.ts:178-178 (registration)Registration of createObjectTool in the list of available tools returned by ListToolsRequestcreateObjectTool,
- Core helper function implementing the createObject logic: ID generation, object creation, validation, and persistenceexport async function createObject( repository: Repository, type: TrellisObjectType, title: string, parent: string | null = null, priority: TrellisObjectPriority = TrellisObjectPriority.MEDIUM, status: TrellisObjectStatus = TrellisObjectStatus.OPEN, prerequisites: string[] = [], description: string = "", ): Promise<{ content: Array<{ type: string; text: string }> }> { // Get existing objects to generate unique ID const existingObjects = await repository.getObjects(true); const existingIds = existingObjects.map((obj) => obj.id); // Generate unique ID const id = generateUniqueId(title, type, existingIds); // Create TrellisObject with current timestamp const now = new Date().toISOString(); const trellisObject: TrellisObject = { id, type, title, status, priority, parent, prerequisites, affectedFiles: new Map(), log: [], schema: "v1.0", childrenIds: [], created: now, updated: now, body: description, }; // Validate object before saving await validateObjectCreation(trellisObject, repository); // Save through repository await repository.saveObject(trellisObject); return { content: [ { type: "text", text: `Created object with ID: ${id}`, }, ], }; }