relational-database-mcp-cloudbase by tencentcloudbase/skills
npx skills add https://github.com/tencentcloudbase/skills --skill relational-database-mcp-cloudbasequerySqlDatabase、manageSqlDatabase、readSecurityRule 或 writeSecurityRule。../relational-database-web/SKILL.md../http-api/SKILL.md广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
_openid 和安全规则检查。当代理需要通过 MCP 工具操作 CloudBase 关系型数据库时使用此技能,例如:
请勿将此技能用于:
querySqlDatabase、manageSqlDatabase、readSecurityRule、writeSecurityRule 等工具,则您处于 MCP 上下文中。querySqlDatabasemanageSqlDatabasereadSecurityRulewriteSecurityRulequerySqlDatabase(action="getInstanceInfo") 或只读 SQL 检查。这些工具是通过 MCP 与 CloudBase 关系型数据库交互的受支持方式:
querySqlDatabaseaction="runQuery" 运行 SELECT 和其他只读 SQL 查询action="getInstanceInfo" 检查 MySQL 是否已存在action="describeCreateResult" 或 action="describeTaskStatus" 检查异步创建进度示例流程:
{
"action": "runQuery",
"sql": "SELECT id, email FROM users ORDER BY created_at DESC LIMIT 50"
}
manageSqlDatabaseaction="provisionMySQL" 创建 MySQLaction="destroyMySQL" 销毁 MySQLaction="runStatement" 执行 INSERT、UPDATE、DELETE、CREATE TABLE、ALTER TABLE、DROP TABLEaction="initializeSchema" 初始化表和索引重要提示: 创建新表时,您必须包含 _openid 列以实现按用户访问控制:
_openid VARCHAR(64) DEFAULT '' NOT NULL
注意:当用户登录时,_openid 由服务器根据认证会话自动填充。在正常的插入操作中不要手动填充它。
调用此工具前,请确认:
销毁 MySQL 时,请确认:
describeTaskStatus 来检查销毁结果。readSecurityRulewriteSecurityRulequerySqlDatabase(action="getInstanceInfo")。manageSqlDatabase(action="provisionMySQL", confirm=true)。querySqlDatabase(action="describeCreateResult")querySqlDatabase(action="describeTaskStatus")READY 时才继续。describeCreateResult;将 describeTaskStatus 保留给其任务响应携带 TaskName 的销毁流程。querySqlDatabase(action="runQuery") 配合有限制的 SELECT 语句。LIMIT 和相关筛选条件。manageSqlDatabase(action="initializeSchema") 运行它们。readSecurityRule 或 writeSecurityRule 验证安全规则。querySqlDatabase(action="runQuery") 检查当前数据或模式。manageSqlDatabase(action="runStatement") 运行一次变更操作。querySqlDatabase(action="getInstanceInfo") 确认当前环境仍存在 SQL 实例。manageSqlDatabase(action="destroyMySQL", confirm=true)。querySqlDatabase(action="describeTaskStatus") 直到销毁任务完成或失败。querySqlDatabase(action="getInstanceInfo") 来确认实例已不存在。作为 MCP 代理工作时,对于 CloudBase 关系型数据库始终优先使用这些 MCP 工具,并避免在同一流程中将其与 SDK 初始化混合使用。
每周安装
546
代码仓库
GitHub 星标
39
首次出现
2026 年 1 月 22 日
安全审计
安装于
opencode481
codex480
gemini-cli471
github-copilot458
kimi-cli451
amp449
querySqlDatabase, manageSqlDatabase, readSecurityRule, or writeSecurityRule.../relational-database-web/SKILL.md../http-api/SKILL.md_openid and security-rule review after creating new SQL tables.Use this skill when an agent needs to operate on CloudBase Relational Database via MCP tools , for example:
Do NOT use this skill for:
Recognize MCP context
querySqlDatabase, manageSqlDatabase, readSecurityRule, writeSecurityRule, you are in MCP context.Pick the right tool for the job
querySqlDatabasemanageSqlDatabasereadSecurityRuleThese tools are the supported way to interact with CloudBase Relational Database via MCP:
querySqlDatabaseSELECT and other read-only SQL queries with action="runQuery"action="getInstanceInfo"action="describeCreateResult" or action="describeTaskStatus"Example flow:
{
"action": "runQuery",
"sql": "SELECT id, email FROM users ORDER BY created_at DESC LIMIT 50"
}
manageSqlDatabaseaction="provisionMySQL"action="destroyMySQL"INSERT, UPDATE, DELETE, CREATE TABLE, ALTER TABLE, DROP TABLE with action="runStatement"action="initializeSchema"Important: When creating a new table, you must include the _openid column for per-user access control:
_openid VARCHAR(64) DEFAULT '' NOT NULL
Note: when a user is logged in, _openid is automatically populated by the server from the authenticated session. Do not manually fill it in normal inserts.
Before calling this tool, confirm :
When destroying MySQL, confirm:
describeTaskStatus afterward to inspect the destroy result.readSecurityRulewriteSecurityRulequerySqlDatabase(action="getInstanceInfo").manageSqlDatabase(action="provisionMySQL", confirm=true).querySqlDatabase(action="describeCreateResult")querySqlDatabase(action="describeTaskStatus")READY.describeCreateResult; reserve describeTaskStatus for destroy flows whose task response carries TaskName.querySqlDatabase(action="runQuery") with a limited SELECT.LIMIT and relevant filters.manageSqlDatabase(action="initializeSchema").readSecurityRule or writeSecurityRule.querySqlDatabase(action="runQuery") to inspect current data or schema if needed.manageSqlDatabase(action="runStatement").querySqlDatabase(action="getInstanceInfo") to confirm the current environment still has a SQL instance.manageSqlDatabase(action="destroyMySQL", confirm=true).querySqlDatabase(action="describeTaskStatus") until the destroy task completes or fails.querySqlDatabase(action="getInstanceInfo") to confirm the instance no longer exists.MCP tools are for agent operations and database management :
SDKs are for application code :
When working as an MCP agent, always prefer these MCP tools for CloudBase Relational Database, and avoid mixing them with SDK initialization in the same flow.
Weekly Installs
546
Repository
GitHub Stars
39
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode481
codex480
gemini-cli471
github-copilot458
kimi-cli451
amp449
writeSecurityRuleAlways be explicit about safety
querySqlDatabase(action="getInstanceInfo") or a read-only SQL check before writes.