Skip to main content
Glama
itzhouq

archery-mcp

by itzhouq

sql_check

Validate release SQL against built-in rules and Archery platform requirements before deployment, checking allowed DML/DDL, WHERE clauses, and platform compliance.

Instructions

检查上线 SQL 是否符合内置规范与 Archery 平台要求。

检查项(内置规范):

  • 上线 SQL 仅支持 DML/DDL,不接受 SELECT 查询;

  • 上线 SQL 不使用复杂语法(存储过程/函数/触发器/CTE/窗口函数等);

  • 上线 SQL 不需要保证事务,不接受 BEGIN/COMMIT 等事务控制;

  • 尽量不使用临时表;

  • UPDATE/DELETE 必须带 WHERE 条件。

同时调用 Archery 平台的 SQL 检查接口(需要账号在 Archery 的 API 用户白名单内并有上线权限);平台检查不可用时保留本地结果并说明原因。

Args: sql: 待检查的上线 SQL,可包含多条语句(分号分隔)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/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 well: it discloses that the Archery platform API is called, that the account must be whitelisted with deployment permission, and that when the platform is unavailable local results are retained with an explanation. What it does not disclose is how violations are reported or whether the check itself fails hard, leaving some behavioral ambiguity.

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?

Purpose is front-loaded in sentence one, the rule list is compact and scannable, and the Args section is separated cleanly. Every bullet carries information, though the formatting is denser than strictly necessary for a single-parameter tool.

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

Completeness4/5

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

For a tool of this complexity (local rule engine plus external platform dependency) the description covers scope, the external auth precondition, and degradation behavior, and an output schema exists so return values need not be explained. Only the failure/reporting semantics remain unstated, a minor gap.

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 description coverage is 0%, so the description must compensate, and it does: 'sql: 待检查的上线 SQL,可包含多条语句(分号分隔)' tells the agent the value is deployment SQL and that multiple semicolon-separated statements are accepted. That is real semantic value (delimiter convention, multi-statement support) beyond the bare 'string' in the schema.

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 opening line names a specific verb and resource ('检查上线 SQL' against built-in rules and Archery platform requirements), which is far more than a restatement of the name. It implicitly separates itself from the query-oriented siblings by stating that SELECT is not accepted. It never names those siblings to route the agent explicitly, 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 Guidelines3/5

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

The enumeration of what is checked implies this is a pre-deployment validation step, but the description never states when to call it (e.g., before executing DDL/DML) or which sibling to use instead for SELECT queries. Usage is inferable from context rather than explicit, so it lands at minimum-viable.

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