Skip to main content
Glama

moveToRealm

Transfer tasks or projects to specified realms within the ADD framework—Assess, Decide, or Do—to align with workflow stages using addTaskManager MCP Server.

Instructions

Move a task or project to a specific realm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemRecordNameYesRecord name of the task or project to move
itemTypeYesType of item to move
realmIdYesTarget realm (assess=1, decide=2, do=3)

Implementation Reference

  • src/index.ts:574-586 (registration)
    Registration of the moveToRealm tool in ListTools response, including full input schema definition.
    { name: 'moveToRealm', description: 'Move a task or project to a specific realm.', inputSchema: { type: 'object', properties: { itemRecordName: { type: 'string', description: 'Record name of the task or project to move' }, itemType: { type: 'string', enum: ['Task', 'Project'], description: 'Type of item to move' }, realmId: { type: 'string', enum: ['assess', 'decide', 'do'], description: 'Target realm (assess=1, decide=2, do=3)' } }, required: ['itemRecordName', 'itemType', 'realmId'] } },
  • Primary dispatch handler for moveToRealm tool execution in CallToolRequestSchema switch statement. Validates input and routes to task or project mover.
    case 'moveToRealm': this.validateArgs(args, ['itemRecordName', 'itemType', 'realmId']); if (args.itemType === 'Task') { return await this.moveTaskToRealm(args.itemRecordName, args.realmId); } else if (args.itemType === 'Project') { return await this.moveProjectToRealm(args.itemRecordName, args.realmId); } else { throw new McpError(ErrorCode.InvalidParams, 'itemType must be Task or Project'); }
  • Handler for moving tasks to a target realm: performs ADD framework validation then delegates to core move logic.
    private async moveTaskToRealm(taskRecordName: string, targetRealm: string) { // Add validation before moving const validationResult = await this.validateRealmTransition(taskRecordName, 'Task', targetRealm as RealmString); if (!validationResult.valid) { throw new McpError(ErrorCode.InvalidParams, validationResult.reason); } return this.moveItemToRealm(taskRecordName, 'Task', targetRealm as RealmString); }
  • Handler for moving projects to a target realm: performs ADD framework validation then delegates to core move logic.
    private async moveProjectToRealm(projectRecordName: string, targetRealm: string) { // Add validation before moving const validationResult = await this.validateRealmTransition(projectRecordName, 'Project', targetRealm as RealmString); if (!validationResult.valid) { throw new McpError(ErrorCode.InvalidParams, validationResult.reason); } return this.moveItemToRealm(projectRecordName, 'Project', targetRealm as RealmString); }
  • Core implementation of realm move: updates realmId, applies realm-specific field cleanup rules, and returns confirmation (mock for development; delegates to CloudKitService in production).
    private async moveItemToRealm(itemRecordName: string, itemType: 'Task' | 'Project', targetRealmStr: RealmString) { const targetRealmId = realmStringToId(targetRealmStr); // Mock update realmId and clean up fields based on realm rules let updateMessage = `${itemType} ${itemRecordName} moved to ${targetRealmStr} realm (ID: ${targetRealmId})`; // Apply realm-specific cleanup rules if (targetRealmId === REALM_ASSESS_ID) { updateMessage += '. Context and due date cleared for fresh evaluation'; } else if (targetRealmId === REALM_DECIDE_ID && targetRealmStr !== 'decide') { updateMessage += '. Ready for context assignment and due date setting'; } return { content: [{ type: 'text', text: updateMessage }] }; }

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/dragosroua/addtaskmanager-mcp-server'

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