relational-database-mcp-cloudbase
This is the required documentation for agents operating on the CloudBase Relational Database. It lists the only four supported tools for running SQL and managing security rules. Read the full content to understand why you must NOT use standard Application SDKs and how to safely execute INSERT, UPDATE, or DELETE operations without corrupting production data.
Install
mkdir -p .claude/skills/relational-database-mcp-cloudbase && curl -L -o skill.zip "https://mcp.directory/api/skills/download/7759" && unzip -o skill.zip -d .claude/skills/relational-database-mcp-cloudbase && rm skill.zipInstalls to .claude/skills/relational-database-mcp-cloudbase
About this skill
Standalone Install Note
If this environment only installed the current skill, start from the CloudBase main entry and use the published cloudbase/references/... paths for sibling skills.
- CloudBase main entry:
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.md - Current skill raw source:
https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/relational-database-tool/SKILL.md
Keep local references/... paths for files that ship with the current skill directory. When this file points to a sibling skill such as auth-tool or web-development, use the standalone fallback URL shown next to that reference.
Activation Contract
Use this first when
- The agent must inspect SQL data, execute SQL statements, provision or destroy MySQL, initialize table structure, or manage table security rules through MCP tools.
Read before writing code if
- The task includes
querySqlDatabase,manageSqlDatabase,queryPermissions, ormanagePermissions.
Then also read
- Web application integration ->
../relational-database-web/SKILL.md(standalone fallback:https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/relational-database-web/SKILL.md) - Raw HTTP database access ->
../http-api/SKILL.md(standalone fallback:https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/http-api/SKILL.md)
Do NOT use for
- Frontend or backend application code that should use SDKs instead of MCP operations.
Common mistakes / gotchas
- Initializing SDKs in an MCP management flow.
- Running write SQL or DDL before checking whether MySQL is provisioned and ready.
- Treating document database tasks as MySQL management tasks.
- Skipping
_openidand permissions review after creating new SQL tables. - Destroying MySQL without explicit confirmation or without checking whether the environment still needs the instance.
When to use this skill
Use this skill when an agent needs to operate on CloudBase Relational Database via MCP tools, for example:
- Inspecting or querying SQL data
- Provisioning MySQL for an environment
- Destroying MySQL for an environment
- Polling MySQL provisioning status
- Modifying data or schema (INSERT/UPDATE/DELETE/DDL)
- Initializing tables and indexes after MySQL is ready
- Reading or changing table permissions
Do NOT use this skill for:
- Building Web or Node.js applications that talk to CloudBase Relational Database directly through SDKs
- Auth flows or user identity management
How to use this skill (for a coding agent)
-
Recognize MCP context
- If you can call tools like
querySqlDatabase,manageSqlDatabase,queryPermissions,managePermissions, you are in MCP context. - In this context, never initialize SDKs for CloudBase Relational Database; use MCP tools instead.
- If you can call tools like
-
Pick the right tool for the job
- Read-only SQL and provisioning status checks ->
querySqlDatabase - MySQL provisioning, MySQL destruction, write SQL, DDL, schema initialization ->
manageSqlDatabase - Inspect permissions ->
queryPermissions(action="getResourcePermission") - Change permissions ->
managePermissions(action="updateResourcePermission")
- Read-only SQL and provisioning status checks ->
-
Always be explicit about safety
- Before destructive operations (DELETE, DROP, etc.), summarize what you are about to run and why.
- Prefer
querySqlDatabase(action="getInstanceInfo")or a read-only SQL check before writes. - Provisioning or destroying MySQL requires explicit confirmation because both actions have environment-level impact.
Available MCP tools (CloudBase Relational Database)
These tools are the supported way to interact with CloudBase Relational Database via MCP:
1. querySqlDatabase
- Purpose: Query SQL data and provisioning state.
- Use for:
- Running
SELECTand other read-only SQL queries withaction="runQuery" - Checking whether MySQL already exists with
action="getInstanceInfo" - Inspecting asynchronous provisioning progress with
action="describeCreateResult"oraction="describeTaskStatus"
- Running
Example flow:
{
"action": "runQuery",
"sql": "SELECT id, email FROM users ORDER BY created_at DESC LIMIT 50"
}
2. manageSqlDatabase
- Purpose: Manage SQL lifecycle and execute mutating SQL.
- Use for:
- Provisioning MySQL with
action="provisionMySQL" - Destroying MySQL with
action="destroyMySQL" - Executing
INSERT,UPDATE,DELETE,CREATE TABLE,ALTER TABLE,DROP TABLEwithaction="runStatement" - Initializing tables and indexes with
action="initializeSchema"
- Provisioning MySQL with
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:
- The current environment has a ready MySQL instance, or you have just provisioned one.
- The target tables and conditions are correct.
- You have run a corresponding read-only query when appropriate.
When destroying MySQL, confirm:
- The current environment really should lose the SQL instance.
- You have explicit confirmation for the destructive action.
- You are prepared to query
describeTaskStatusafterward to inspect the destroy result.
3. queryPermissions
- Purpose: Read permission configuration for a given SQL table.
- Use for:
- Understanding who can read/write a table
- Auditing permissions on sensitive tables
- Call shape:
queryPermissions(action="getResourcePermission", resourceType="sqlDatabase", resourceId="<tableName>")
4. managePermissions
- Purpose: Set or update permissions for a given SQL table.
- Use for:
- Hardening access to sensitive data
- Opening up read access while restricting writes
- Updating resource-level permission configuration
- Call shape:
managePermissions(action="updateResourcePermission", resourceType="sqlDatabase", resourceId="<tableName>", permission="READONLY")
Compatibility
- Canonical plugin name:
permissions - Legacy plugin aliases
security-rule,security-rules,secret-rule,secret-rules, andaccess-controlare still routed topermissions - Legacy tools
readSecurityRuleandwriteSecurityRuleare removed; always usequeryPermissionsandmanagePermissions
Recommended lifecycle flow
Scenario 1: MySQL is not provisioned yet
- Call
querySqlDatabase(action="getInstanceInfo"). - If no instance exists, call
manageSqlDatabase(action="provisionMySQL", confirm=true). - Poll provisioning status with:
querySqlDatabase(action="describeCreateResult")querySqlDatabase(action="describeTaskStatus")
- Only continue when the returned lifecycle status is
READY. - For MySQL provisioning, prefer
describeCreateResult; reservedescribeTaskStatusfor destroy flows whose task response carriesTaskName.
Scenario 2: Safely inspect data in a table
- Use
querySqlDatabase(action="runQuery")with a limitedSELECT. - Include
LIMITand relevant filters. - Review the result set and confirm it matches expectations before any write operation.
Scenario 3: Apply schema initialization after provisioning
- Confirm MySQL is ready.
- Prepare ordered DDL statements.
- Run them through
manageSqlDatabase(action="initializeSchema"). - After creating tables, verify permissions with
queryPermissionsormanagePermissions.
Scenario 4: Execute a targeted write or DDL change
- Use
querySqlDatabase(action="runQuery")to inspect current data or schema if needed. - Run the mutation once with
manageSqlDatabase(action="runStatement"). - Validate with another read-only query or by checking security rules.
Scenario 5: Destroy MySQL when the environment no longer needs it
- Use
querySqlDatabase(action="getInstanceInfo")to confirm the current environment still has a SQL instance. - Call
manageSqlDatabase(action="destroyMySQL", confirm=true). - Query
querySqlDatabase(action="describeTaskStatus")until the destroy task completes or fails. - If the task succeeds, optionally call
querySqlDatabase(action="getInstanceInfo")to confirm the instance no longer exists. - If the task fails, treat the returned error as the terminal result and let the caller decide whether to retry.
Key principle: MCP tools vs SDKs
-
MCP tools are for agent operations and database management:
- Provision MySQL.
- Destroy MySQL.
- Poll lifecycle state.
- Run ad-hoc SQL.
- Inspect and change resource permissions.
- Do not depend on application auth state.
-
SDKs are for application code:
- Frontend Web apps -> Web Relational Database skill.
- Backend Node apps -> Node Relational Database quickstart.
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.
More by TencentCloudBase
View all skills by TencentCloudBase →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversBoost AI coding agents with Ref Tools—efficient documentation access for faster, smarter code generation than GitHub Cop
Supercharge your NextJS projects with AI-powered tools for diagnostics, upgrades, and docs. Accelerate development and b
Unlock AI-powered automation for Postman for API testing. Streamline workflows, code sync, and team collaboration with f
Rtfmbro is an MCP server for config management tools—get real-time, version-specific docs from GitHub for Python, Node.j
Nia is an MCP server that boosts coding agents’ performance by indexing extra documentation and codebases for improved r
Deepcon is an AI coding assistant server offering up-to-date package docs via semantic search for smarter, faster AI pow
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.