Skip to main content
Glama
dragosroua

addTaskManager MCP Server

by dragosroua

moveToRealm

Transfer tasks or projects between ADD framework realms (Assess, Decide, Do) to manage workflow stages and enforce realm-specific actions like editing, scheduling, or completion.

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

  • Schema definition for the moveToRealm tool, including input parameters and description. Part of the tools list returned by listTools.
      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']
      }
    },
  • Main handler for moveToRealm tool in the CallToolRequestSchema switch statement. Validates args and dispatches to task/project specific move functions.
      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');
      }
    case 'get_collections':
      return await this.getCollections();
  • Task-specific handler that validates realm transition before calling generic moveItemToRealm.
    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);
    }
  • Project-specific handler that validates realm transition before calling generic moveItemToRealm.
    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 logic for moving an item to a target realm, including realm-specific message and mock update.
    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