Skip to main content
Glama

get_commandlog

Retrieve recent command log entries from Valkey 8+ instances for monitoring and debugging database operations.

Instructions

Get the most recent entries from COMMANDLOG (Valkey 8+ only, superset of slowlog).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of entries to return (default 25)
instanceIdNoOptional instance ID override

Implementation Reference

  • The handler for the 'get_commandlog' MCP tool. It fetches data from the API endpoint '/mcp/instance/${id}/commandlog'.
    server.tool(
      'get_commandlog',
      'Get the most recent entries from COMMANDLOG (Valkey 8+ only, superset of slowlog).',
      {
        count: z.number().optional().describe('Number of entries to return (default 25)'),
        instanceId: z.string().optional().describe('Optional instance ID override'),
      },
      async ({ count, instanceId }) => {
        const id = resolveInstanceId(instanceId);
        const n = count ?? 25;
        const data = await apiFetch(`/mcp/instance/${id}/commandlog?count=${n}`);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },

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/BetterDB-inc/monitor'

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