Skip to main content
Glama

get_latency_history

Analyze latency trends over time for specific events in Valkey/Redis instances to identify performance patterns and investigate historical behavior.

Instructions

Get the full latency history for a named event (e.g. 'command', 'fast-command'). Call get_latency first to see which event names are available, then use this to investigate a specific event's trend over time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventNameYesLatency event name to query
instanceIdNoOptional instance ID override

Implementation Reference

  • The MCP tool handler for 'get_latency_history'. It fetches the latency history data from the API based on the event name.
    async ({ eventName, instanceId }) => {
      const id = resolveInstanceId(instanceId);
      const data = await apiFetch(`/mcp/instance/${id}/latency/history/${encodeURIComponent(eventName)}`);
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
      };
  • Registration of the 'get_latency_history' MCP tool, including input schema validation.
    server.tool(
      'get_latency_history',
      "Get the full latency history for a named event (e.g. 'command', 'fast-command'). Call get_latency first to see which event names are available, then use this to investigate a specific event's trend over time.",
      {
        eventName: z.string().regex(/^[a-zA-Z0-9_.-]+$/, 'Invalid event name').describe('Latency event name to query'),
        instanceId: z.string().optional().describe('Optional instance ID override'),
      },
      async ({ eventName, instanceId }) => {
        const id = resolveInstanceId(instanceId);
        const data = await apiFetch(`/mcp/instance/${id}/latency/history/${encodeURIComponent(eventName)}`);
        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