Skip to main content
Glama

server_rename_file

Rename or move files and directories on a Minecraft server by specifying the server ID, current path, and new name.

Instructions

Rename or move a file or directory on a Minecraft server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
server_idYesServer ID or UUID
pathYesCurrent relative file path
new_nameYesNew file/directory name

Implementation Reference

  • The tool "server_rename_file" is registered and handled within the `registerServerFileTools` function in `src/tools/server-files.ts`. It takes `server_id`, `path`, and `new_name` as input parameters and executes a patch request to the server's file management endpoint.
    server.tool(
      "server_rename_file",
      "Rename or move a file or directory on a Minecraft server",
      {
        server_id: z.string().describe("Server ID or UUID"),
        path: z.string().describe("Current relative file path"),
        new_name: z.string().describe("New file/directory name"),
      },
      async ({ server_id, path, new_name }) => {
        try {
          const data = await client.patch(`/servers/${server_id}/files/create`, {
            path,
            new_name,
          });
          return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: "text", text: `Error: ${msg}` }], isError: true };
        }
      }
    );
Behavior2/5

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

With no annotations, the description carries full burden but provides minimal behavioral context. It states the action but doesn't disclose permissions needed, whether the operation is atomic, if it overwrites existing files, error conditions, or side effects. This is inadequate for a mutation tool.

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 with zero waste. It's front-loaded with the core action and target, 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?

For a mutation tool with no annotations and no output schema, the description is insufficient. It lacks behavioral details (permissions, side effects), usage context, and output expectations. Given the complexity of file operations, more completeness is needed.

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?

Schema description coverage is 100%, so parameters are documented in the schema. The description adds no additional meaning about parameters beyond implying 'path' and 'new_name' relate to file operations. Baseline 3 is appropriate as 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 ('Rename or move') and target ('a file or directory on a Minecraft server'), providing specific verb+resource. However, it doesn't explicitly differentiate from sibling tools like server_update_file or server_create_directory, which might handle similar operations.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, when-not scenarios, or compare to siblings like server_update_file (which might handle content updates) or server_create_directory (for creation).

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/HadiCherkaoui/crafty-mcp'

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