Skip to main content
Glama

das__ExportTopSqlTemplatesDetails

Exports TopSQL template details for a DAS instance with TopSQL enabled, using a start and end time within a one-hour window; supports paid instances only.

Instructions

[DAS] TopSQL开关打开后,导出TopSQL模板列表。该功能仅支持付费实例。查询时间间隔最长一小时。

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": {
      "datastore_type": "<datastore_type>",
      "end_at": "<end_at>",
      "instance_id": "<instance_id>",
      "project_id": "<project_id>",
      "start_at": "<start_at>"
    },
    "name": "das__ExportTopSqlTemplatesDetails"
  }
}

Input Schema

NameRequiredDescriptionDefault
ascNo排序顺序(true:正序, false:逆序)。
sortNo排序字段(executeNum:执行次数, totalCost:总耗时, avgCost:平均耗时, totalScan: 总扫描行数, avgScan:平均扫描行数)。avgCost
limitNo每页记录数,默认为20,最大取值100。
end_atYes结束时间(Unix timestamp),单位:毫秒。
offsetNo偏移量。从第一条数据偏移offset条数据后开始查询,默认为0(偏移0条数据,表示从第一条数据开始查询),必须为数字,不能为负数。
node_idNo节点ID。
start_atYes开始时间(Unix timestamp),单位:毫秒。
project_idYes项目ID。
instance_idYes实例ID。
datastore_typeYes数据库类型。支持MySQL和GaussDB(for MySQL)。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden and does disclose real constraints (paid instance requirement, TopSQL switch prerequisite, one-hour window). However, it never says what an "export" actually returns — a downloadable file, a URL, or an async task ID — nor whether the operation is non-idempotent or job-creating, which is significant for a tool with no annotations and no output schema.

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

Conciseness5/5

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

Three short sentences, front-loaded with the core action and followed by the most decision-relevant constraints (paid instances, time window). Nothing is repeated from the schema and no sentence is wasted.

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?

For a 10-parameter export tool with no annotations and no output schema, the description covers prerequisites and time limits adequately but omits the return shape/pagination behavior and says nothing about the sort/limit/offset result semantics. An agent knows when it may call it, but not fully what it will get back.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline would be 3, but the description adds a constraint not present in the schema: start_at and end_at must span at most one hour. That materially changes how an agent must populate two required parameters, which is value beyond the structured fields.

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

Purpose4/5

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

The description states a specific verb and resource ("导出TopSQL模板列表") plus a precondition that the TopSQL switch must be enabled, which separates it from the trend/statistics siblings. It does not explicitly name the closest alternative (ExportSlowSqlTemplatesDetails) or state that this is the TopSQL counterpart to it, leaving that inference to the reader.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives concrete eligibility conditions: TopSQL switch must be on, paid instances only, and the queried time window may not exceed one hour. These are genuine when/when-not constraints, but no alternative tool is named for the slow-SQL or trend variants, so routing among the Export* siblings is only partially guided.

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