Skip to main content
Glama

list_ops

Display all server operators from the ops.json file to manage administrator permissions in Minecraft Java Edition servers.

Instructions

List all server operators from ops.json.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the "list_ops" tool, which reads and parses ops.json to return a formatted list of server operators.
    server.tool(
      "list_ops",
      "List all server operators from ops.json.",
      {},
      async () => {
        const opsPath = path.join(manager.getServerDir(), "ops.json");
        if (!fs.existsSync(opsPath)) {
          return {
            content: [{ type: "text", text: "ops.json not found." }],
          };
        }
        const ops = JSON.parse(fs.readFileSync(opsPath, "utf-8"));
        if (!Array.isArray(ops) || ops.length === 0) {
          return { content: [{ type: "text", text: "No operators configured." }] };
        }
        const lines = ops.map(
          (op: { name: string; uuid: string; level: number }) =>
            `${op.name} (UUID: ${op.uuid}, Level: ${op.level})`
        );
        return { content: [{ type: "text", text: lines.join("\n") }] };
      }
    );

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/tamo2918/Minecraft-Server-MCP'

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