sql-template-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SUPABASE_URL | Yes | 你的 Supabase 项目 URL,格式如 https://your-project-ref.supabase.co | |
| NVIDIA_API_KEY | No | NVIDIA 免费 Embedding API 密钥(可选),用于语义检索。未配置时降级为纯关键词检索 | |
| SUPABASE_SERVICE_ROLE_KEY | Yes | Supabase 服务角色密钥,拥有绕过 RLS 的完整权限,仅限服务端/本地 MCP 使用 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| save_sql_templateA | 将一次生成的 SQL 步骤沉淀为模板,存入模板库(Supabase)。 参数:
返回:保存结果(含模板 id)或相似模板提示。 |
| search_sql_templateA | 在模板库中检索可复用的 SQL 模板(生成 SQL 前先调用,形成闭环)。 采用混合检索:语义向量召回(NVIDIA Embedding) + 关键词模糊匹配,按相似度/使用次数综合排序。 若未配置 NVIDIA_API_KEY,自动降级为纯关键词检索,不影响原有能力。 参数:
返回:匹配模板的 Markdown 列表(含 SQL 与验证状态,语义命中会标注相似度)。 |
| semantic_search_sql_templateA | 用语义向量召回模板,适合自然语言/口语化描述(如同义改写、业务意图)。 底层调用 schema.sql 的 match_sql_templates RPC(pgvector 余弦距离)。 需配置 NVIDIA_API_KEY;未配置或调用失败时返回降级提示。 参数:
返回:按语义相似度排序的模板 Markdown 列表(含相似度分值)。 |
| get_sql_templateA | 按 id 获取单个模板的完整内容。 |
| list_sql_templatesA | 列出模板库中的模板(可按分类/单据类型/验证状态过滤),用于总览。 |
| update_sql_templateB | 更新已有模板的字段(如补充验证标记、修正 SQL、补充执行过程伪代码)。
|
| delete_sql_templateB | 删除指定模板(清理错误/过期模板)。 |
| record_template_usageA | 记录某模板被实际使用一次(使用次数 +1,刷新最近使用时间)。 在技能复用模板生成最终 SQL 后调用,用于评估模板价值、优化检索排序。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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