Skip to main content
Glama

server_get_file

Read configuration files from a Minecraft server to manage settings, permissions, and server properties.

Instructions

Read the contents of a file on a Minecraft server (e.g., server.properties, ops.json, whitelist.json)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
server_idYesServer ID or UUID
pathYesRelative file path to read

Implementation Reference

  • The handler function for the 'server_get_file' tool, which fetches file contents from a Minecraft server using a POST request.
    async ({ server_id, path }) => {
      try {
        const data = await client.post(`/servers/${server_id}/files`, { path });
        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 };
      }
  • Tool registration for 'server_get_file', including its schema definition.
    server.tool(
      "server_get_file",
      "Read the contents of a file on a Minecraft server (e.g., server.properties, ops.json, whitelist.json)",
      {
        server_id: z.string().describe("Server ID or UUID"),
        path: z.string().describe("Relative file path to read"),
      },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it's a read operation, which is clear, but doesn't disclose behavioral traits such as authentication requirements, rate limits, file size limitations, error conditions (e.g., if file doesn't exist), or whether it returns raw text or structured data. This leaves gaps for an AI agent to understand operational constraints.

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 front-loads the core purpose and includes helpful examples without unnecessary elaboration. Every word earns its place, making it easy for an AI agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete for a tool that reads file contents. It doesn't explain what the return value looks like (e.g., text content, JSON structure, error formats), which is critical for an AI agent to handle responses. However, the purpose is clear, and parameters are well-documented in the schema, making it minimally viable but with significant gaps in behavioral and output context.

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 the schema already documents both parameters (server_id and path) adequately. The description adds minimal value by implying the path parameter should point to specific file types (e.g., configuration files), but doesn't provide additional syntax, format details, or constraints beyond what the schema states. 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 ('Read the contents') and target resource ('a file on a Minecraft server'), with specific examples provided. It distinguishes from siblings like server_list_files (which lists files) and server_update_file (which modifies files). However, it doesn't explicitly differentiate from server_get (which might retrieve server metadata rather than file contents).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning example file types (server.properties, ops.json, whitelist.json), suggesting it's for reading configuration or management files. However, it doesn't explicitly state when to use this tool versus alternatives like server_get_logs (for log files) or server_get_stats (for statistics), nor does it mention prerequisites or constraints.

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