Skip to main content
Glama

mrs__ExecuteSql

Submit and execute a SQL statement on a specified MRS cluster to query or process data, supporting Presto SQL and optional result archiving.

Instructions

[MRS] 在MRS集群中提交并执行一条SQL语句。

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": {
      "cluster_id": "<cluster_id>",
      "project_id": "<project_id>",
      "sql_content": "<sql_content>",
      "sql_type": "<sql_type>"
    },
    "name": "mrs__ExecuteSql"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseNo执行SQL所在的数据库,默认为default。
sql_typeYesSQL类型。目前仅支持“presto”类型的SQL。
cluster_idYes集群ID。获取方法,请参见[获取集群ID](https://support.huaweicloud.com/api-mrs/mrs_02_9001.html)。
project_idYes项目编号。获取方法,请参见[获取项目ID](https://support.huaweicloud.com/api-mrs/mrs_02_0011.html)。
sql_contentYes待执行的SQL语句。
archive_pathNoSQL执行结果的转储文件夹。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It does not say whether execution is synchronous or job-based, how the result is retrieved (a nearby tool named ShowSqlResult suggests later polling), whether DDL or DML is permitted, or what permissions are required. 'Execute SQL' can mutate cluster data, but the description gives no hint of side effects or reversibility.

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

Conciseness3/5

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

The description is a single front-loaded sentence with zero waste, which is good structurally. But the brevity reflects under-specification rather than disciplined conciseness; a viable definition for a six-parameter execution tool needs more than one line.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with six parameters, including four required ones, and no output schema or annotations, the description should explain what an execution returns and how to follow up on it. Given that a sibling named ShowSqlResult exists, an agent would need to know whether this call returns a result directly or a handle to be polled, and the description says nothing about that.

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

Parameters3/5

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

Schema description coverage is 100%, so all six parameters, including cluster_id, project_id, sql_type, database, and archive_path, already carry inline documentation with links. The description adds no meaning beyond the schema, which is the expected baseline when the schema does the heavy lifting.

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 pair and resource: submit and execute a SQL statement in an MRS cluster. An agent knows exactly what the tool does. It does not differentiate itself from siblings such as mrs__CreateExecuteJob or mrs__ShowSqlResult, so it stops short of a 5.

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

Usage Guidelines2/5

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

There is no guidance on when to call this tool versus alternatives: no mention of the sibling tools that retrieve or cancel execution results, and no prerequisites. The agent must infer the whole workflow from the tool name and schema.

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