Skip to main content
Glama
nichuan

sql-template-mcp

by nichuan

update_sql_template

Update existing SQL templates to correct SQL, add validation markers, execution flow steps, and sanitized examples for reliable reuse.

Instructions

更新已有模板的字段(如补充验证标记、修正 SQL、补充执行过程伪代码)。

  • execution_flow: 执行过程伪代码([INPUT]/[STEP]/QUERY/ASSERT/CONDITION/ACTION), 为存量高频数据修复模板渐进式补充,指导大模型分步执行。

  • example_case: 脱敏示例(输入参数 → 中间结果 → 最终 SQL 的完整轨迹)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNo
categoryNo
doc_typeNo
keywordsNo
scenarioNo
sql_textNo
verifiedNo
core_tablesNo
template_idYes
template_noNo
verified_atNo
example_caseNo
placeholdersNo
execution_flowNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description must carry the full behavioral burden. It explains the intended content of execution_flow and example_case, but does not disclose whether omitted fields are preserved or reset, what happens if the template does not exist, required permissions, or response/error behavior.

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?

The description is short and front-loaded: the first sentence states the core action, and the bullet points add only the field-specific guidance that is most likely to need explanation. No redundant or filler content is present.

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

Completeness1/5

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

For a mutation tool with 14 parameters, no annotations, and zero schema descriptions, this description is severely incomplete. It covers only two fields in detail and leaves critical update semantics—partial vs. full replacement, validation, error cases, and permissions—entirely unaddressed.

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 0%, so the description must compensate for 14 parameters. It adds meaningful detail for only execution_flow and example_case, while the remaining 12 parameters (e.g., title, category, verified, placeholders) receive no semantic explanation beyond their schema names and defaults.

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?

The description uses a specific verb ('更新' / update) and a concrete resource ('已有模板的字段' / fields of existing templates), with examples of what can be updated. This clearly differentiates it from sibling tools like get, search, list, delete, and save.

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 text implies the tool is for existing templates via '已有模板', but it does not explicitly state when to use this tool versus save_sql_template or when not to use it. There are no named alternatives or exclusion conditions.

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

Install Server

Other Tools

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/nichuan/sql-template-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server