assess_create_project
Create a new project in the Assess realm by specifying a project name, optional start date, and parent collection record. Designed for the addTaskManager MCP Server to manage tasks and projects using the ADD framework.
Instructions
Create a new project in Assess realm.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collectionRecordName | No | Optional recordName of the parent collection. | |
| projectName | Yes | Project name/description (max 1500 chars) | |
| startDate | No | Optional start date (ISO format) |
Implementation Reference
- src/index.ts:948-965 (handler)Main handler function implementing the tool logic. Creates a mock CloudKit-compatible project record in Assess realm (realmId=1), generates recordName UUID, sets timestamps and optional collection reference, returns success message with new record ID.private async createProject(projectName: string, startDateISO?: string, collectionRecordName?: string) { const now = Date.now(); const projectRecordName = `project_ck_${uuidv4()}`; const project: ZenTaskticProject = { recordType: 'Projects', recordName: projectRecordName, fields: { projectName: { value: projectName }, realmId: { value: REALM_ASSESS_ID }, uniqueId: { value: uuidv4() }, startDate: { value: startDateISO ? new Date(startDateISO).getTime() : now }, lastModified: { value: now }, ...(collectionRecordName && { collection: { value: { recordName: collectionRecordName, action: 'NONE' } } }), } }; // Mock save: console.log('Mock CloudKit: Creating Project', project); return { content: [{ type: 'text', text: `Project "${projectName}" created in Assess realm with ID ${projectRecordName}.` }] }; }
- src/index.ts:666-667 (registration)Tool handler registration in CallToolRequestSchema switch statement. Validates required 'projectName' argument and delegates execution to createProject method.this.validateArgs(args, ['projectName']); return await this.createProject(args.projectName, args.startDate, args.collectionRecordName);
- src/index.ts:283-294 (schema)Tool schema definition and registration in ListToolsRequestSchema response. Specifies input schema with required projectName and optional startDate/collectionRecordName.name: 'assess_create_project', description: 'Create a new project in Assess realm.', inputSchema: { type: 'object', properties: { projectName: { type: 'string', description: 'Project name/description (max 1500 chars)' }, startDate: { type: 'string', format: 'date-time', description: 'Optional start date (ISO format)' }, collectionRecordName: { type: 'string', description: 'Optional recordName of the parent collection.' } }, required: ['projectName'] } },
- src/index.ts:110-131 (schema)TypeScript interface defining the CloudKit-compatible structure for project records, used directly in the createProject handler.export interface ZenTaskticProject { recordName?: string; recordType: 'Projects'; // Note: entity name is 'Projects' in Core Data fields: { projectName: { value: string }; // Max 1500 chars realmId: { value: number }; // Integer 16, default 0 uniqueId: { value: string }; // UUID // References (relationships in Core Data) context?: { value: CKReference }; // Reference to Contexts record collection?: { value: CKReference }; // Reference to Collections record realm?: { value: CKReference }; // Reference to Realms record tasks?: { value: CKReference[] }; // List of references to Task records // Dates startDate?: { value: number }; // Timestamp endDate?: { value: number }; // Timestamp lastModified: { value: number }; // Timestamp // removed description (use projectName), removed isCompleted }; }