Skip to main content
Glama

server_logs

Retrieve recent console output from a Minecraft server to debug startup issues or monitor server activity. Specify the number of log lines to fetch.

Instructions

Get recent server console output. Useful for debugging startup issues or monitoring activity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesNoNumber of recent log lines to retrieve (default: 50, max: 500)

Implementation Reference

  • The 'server_logs' tool is registered and implemented in src/tools/server-tools.ts. It uses the ServerManager instance to fetch recent logs and returns them as text content.
    server.tool(
      "server_logs",
      "Get recent server console output. Useful for debugging startup issues or monitoring activity.",
      {
        lines: z
          .number()
          .optional()
          .default(50)
          .describe("Number of recent log lines to retrieve (default: 50, max: 500)"),
      },
      async ({ lines }) => {
        const count = Math.min(Math.max(1, lines), 500);
        const output = manager.getRecentOutput(count);
        if (output.length === 0) {
          return {
            content: [
              {
                type: "text",
                text: "No server output available. The server may not have been started.",
              },
            ],
          };
        }
        return { content: [{ type: "text", text: output.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