Skip to main content
Glama
Cloady

Cloady

Official
by Cloady

Read Engine Slow Log

readEngineSlowLog
Read-only

Retrieve slow engine statements and command logs from Postgres, MongoDB, ClickHouse, MySQL, MariaDB, and cache services within a chosen time range, newest first, to diagnose performance issues.

Instructions

Returns statements slower than the engine's own threshold across range, newest first: Postgres duration: log lines, MongoDB slow operation log lines, ClickHouse system.query_log, the performance_schema statement history on MySQL and MariaDB, and SLOWLOG (COMMANDLOG on Valkey) on a cache. The last two keep only recent entries. Needs the developer role, because statements and command arguments carry data.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspaceSlug": "<workspaceSlug>",
      "appSlug": "<appSlug>",
      "serviceName": "<serviceName>"
    },
    "name": "readEngineSlowLog"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNo
rangeNoHow far back to look; the answer has 30 to 96 points across it1h
regionNo
appSlugYes
serviceNameYes
workspaceSlugYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.18.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered; the description adds genuinely non-obvious behavior beyond that: results are newest-first, the last two engines keep only recent entries (so older range requests may return nothing), and the developer role is required because statements and command arguments carry data. It does not disclose result volume, pagination, or truncation limits, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core contract (what is returned, over what window, in what order) before the engine enumeration. The engine list is long but each item earns its place by telling the agent which backends are actually covered; the trailing role/permission clause is compact.

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?

Adequate for a read-only tool but not complete: there is no output schema, and the description never says what a returned entry looks like (timestamp, duration, statement text, engine) or how serviceName/appSlug/region are resolved against a service. What it does cover well — engines, ordering, retention, required role — is the part an agent could not get from the sparse schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 17% — just `range` is documented — so the description must compensate for workspaceSlug, appSlug, serviceName, env, and region, and it does not. It only reuses `range` ('across `range`, newest first') while adding the useful hint that retention on cache/MySQL sources is window-limited, which partially informs range choice but leaves five parameters unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Returns statements slower than the engine's own threshold') and then pins down the exact underlying source per engine: Postgres `duration:` lines, MongoDB slow ops, ClickHouse system.query_log, performance_schema history, SLOWLOG/COMMANDLOG. This is far more specific than sibling log/metric tools and lets an agent tell it apart from readServiceLogs or streamEngineStatements without opening the schema.

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?

Usage is implied rather than stated: the agent can infer this is for slow-query investigation, and the developer-role prerequisite plus the retention caveat shape when it can be used. There is no explicit when-not guidance or named alternative (e.g. traces via searchServiceTraces, or live statements via streamEngineStatements), so routing still requires inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools