Skip to main content
Glama

folder_move

Move folders within Unity projects to reorganize assets and manage project structure by specifying source and target paths.

Instructions

Move a folder to a new location in Unity project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourcePathYesCurrent path of the folder
targetPathYesTarget path for the folder

Implementation Reference

  • Handler function in executeTool that validates input parameters, calls the adapter's moveFolder method, and returns a success message with details.
    case 'folder_move': {
      if (!args.sourcePath || !args.targetPath) {
        throw new Error('sourcePath and targetPath are required');
      }
      const result = await this.adapter.moveFolder(args.sourcePath, args.targetPath);
      return {
        content: [{
          type: 'text',
          text: `Folder moved successfully:\nFrom: ${result.sourcePath}\nTo: ${result.targetPath}\nGUID: ${result.guid}`
        }]
      };
    }
  • Tool schema definition including name, description, and input schema for validation.
    {
      name: 'folder_move',
      description: 'Move a folder to a new location in Unity project',
      inputSchema: {
        type: 'object',
        properties: {
          sourcePath: {
            type: 'string',
            description: 'Current path of the folder'
          },
          targetPath: {
            type: 'string',
            description: 'Target path for the folder'
          }
        },
        required: ['sourcePath', 'targetPath']
      }
    },
  • Registration of all tools including folder_move in the getTools() method which returns the array of Tool objects.
    getTools(): Tool[] {
      return [
        // Script tools
        {
          name: 'script_create',
          description: 'Create a new C# script in Unity project',
          inputSchema: {
            type: 'object',
            properties: {
              fileName: {
                type: 'string',
                description: 'Name of the script file (without .cs extension)'
              },
              content: {
                type: 'string',
                description: 'Script content (optional, will use template if not provided)'
              },
              folder: {
                type: 'string',
                description: 'Target folder path (default: Assets/Scripts)'
              }
            },
            required: ['fileName']
          }
        },
        {
          name: 'script_read',
          description: 'Read a C# script from Unity project',
          inputSchema: {
            type: 'object',
            properties: {
              path: {
                type: 'string',
                description: 'Path to the script file'
              }
            },
            required: ['path']
          }
        },
        {
          name: 'script_delete',
          description: 'Delete a C# script from Unity project',
          inputSchema: {
            type: 'object',
            properties: {
              path: {
                type: 'string',
                description: 'Path to the script file'
              }
            },
            required: ['path']
          }
        },
        {
          name: 'script_apply_diff',
          description: 'Apply a unified diff to a C# script',
          inputSchema: {
            type: 'object',
            properties: {
              path: {
                type: 'string',
                description: 'Path to the script file'
              },
              diff: {
                type: 'string',
                description: 'Unified diff content to apply'
              },
              options: {
                type: 'object',
                description: 'Optional diff application settings',
                properties: {
                  dryRun: {
                    type: 'boolean',
                    description: 'Preview changes without applying (default: false)'
                  }
                }
              }
            },
            required: ['path', 'diff']
          }
        },
        
        // Shader tools
        {
          name: 'shader_create',
          description: 'Create a new shader in Unity project',
          inputSchema: {
            type: 'object',
            properties: {
              name: {
                type: 'string',
                description: 'Name of the shader (without .shader extension)'
              },
              content: {
                type: 'string',
                description: 'Shader content (optional, will use template if not provided)'
              },
              folder: {
                type: 'string',
                description: 'Target folder path (default: Assets/Shaders)'
              }
            },
            required: ['name']
          }
        },
        {
          name: 'shader_read',
          description: 'Read a shader from Unity project',
          inputSchema: {
            type: 'object',
            properties: {
              path: {
                type: 'string',
                description: 'Path to the shader file'
              }
            },
            required: ['path']
          }
        },
        {
          name: 'shader_delete',
          description: 'Delete a shader from Unity project',
          inputSchema: {
            type: 'object',
            properties: {
              path: {
                type: 'string',
                description: 'Path to the shader file'
              }
            },
            required: ['path']
          }
        },
        
        // Project tools
        {
          name: 'project_info',
          description: 'Get comprehensive Unity project information including render pipeline details, project path, Unity version, and platform info',
          inputSchema: {
            type: 'object',
            properties: {}
          }
        },
        {
          name: 'project_status',
          description: 'Check Unity MCP server connection status (simple connectivity test only)',
          inputSchema: {
            type: 'object',
            properties: {}
          }
        },
        {
          name: 'setup_unity_bridge',
          description: 'Install/update Unity MCP bridge scripts to a Unity project (works even if Unity server is not running)',
          inputSchema: {
            type: 'object',
            properties: {
              projectPath: {
                type: 'string',
                description: 'Path to the Unity project'
              },
              forceUpdate: {
                type: 'boolean',
                description: 'Force update even if scripts are up to date',
                default: false
              }
            },
            required: ['projectPath']
          }
        },
        
        // Folder tools
        {
          name: 'folder_create',
          description: 'Create a new folder in Unity project',
          inputSchema: {
            type: 'object',
            properties: {
              path: {
                type: 'string',
                description: 'Path for the new folder (e.g., Assets/MyFolder)'
              }
            },
            required: ['path']
          }
        },
        {
          name: 'folder_rename',
          description: 'Rename a folder in Unity project',
          inputSchema: {
            type: 'object',
            properties: {
              oldPath: {
                type: 'string',
                description: 'Current path of the folder'
              },
              newName: {
                type: 'string',
                description: 'New name for the folder'
              }
            },
            required: ['oldPath', 'newName']
          }
        },
        {
          name: 'folder_move',
          description: 'Move a folder to a new location in Unity project',
          inputSchema: {
            type: 'object',
            properties: {
              sourcePath: {
                type: 'string',
                description: 'Current path of the folder'
              },
              targetPath: {
                type: 'string',
                description: 'Target path for the folder'
              }
            },
            required: ['sourcePath', 'targetPath']
          }
        },
        {
          name: 'folder_delete',
          description: 'Delete a folder from Unity project',
          inputSchema: {
            type: 'object',
            properties: {
              path: {
                type: 'string',
                description: 'Path of the folder to delete'
              },
              recursive: {
                type: 'boolean',
                description: 'Delete all contents recursively (default: true)'
              }
            },
            required: ['path']
          }
        },
        {
          name: 'folder_list',
          description: 'List contents of a folder in Unity project',
          inputSchema: {
            type: 'object',
            properties: {
              path: {
                type: 'string',
                description: 'Path of the folder to list (default: Assets)'
              },
              recursive: {
                type: 'boolean',
                description: 'List all subdirectories recursively (default: false)'
              }
            }
          }
        }
      ];
  • Helper method in UnityHttpAdapter that performs the HTTP call to Unity server for moving a folder.
    async moveFolder(sourcePath: string, targetPath: string): Promise<{ sourcePath: string; targetPath: string; guid: string }> {
      return this.call('folder/move', { sourcePath, targetPath });
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Move') but doesn't describe what happens during the move (e.g., overwrites, permissions needed, error conditions, or effects on linked assets). For a mutation tool with zero annotation coverage, this leaves critical behavioral traits unspecified.

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 action ('Move a folder') and context ('in Unity project'). There is no wasted verbiage or redundancy, making it easy to parse quickly.

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 (a mutation operation), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like error handling, return values, or side effects, which are crucial for safe invocation. The schema covers parameters well, but overall context is insufficient for a mutation tool.

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?

The input schema has 100% description coverage, with clear documentation for both parameters (sourcePath and targetPath). The description adds no additional parameter semantics beyond what the schema provides, such as path format examples or constraints. This meets the baseline of 3 since the schema does the heavy lifting.

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 action ('Move') and resource ('a folder') with context ('in Unity project'), making the purpose immediately understandable. It distinguishes from siblings like folder_create, folder_delete, and folder_rename by specifying movement rather than creation, deletion, or renaming. However, it doesn't explicitly differentiate from other movement operations that might exist in the broader system.

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 prerequisites (e.g., folder existence), exclusions (e.g., cannot move to non-existent paths), or comparisons to siblings like folder_rename for similar operations. The agent must infer usage from the name and context alone.

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/zabaglione/mcp-server-unity'

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