execute_sql
Execute SQL queries on databases within a workspace group using SingleStore MCP Server. Retrieve formatted results, metadata, and execution status while adhering to strict read-only query restrictions for security.
Instructions
Execute SQL operations on a database attached to workspace within a workspace group and receive formatted results.
Returns:
- Query results with column names and typed values
- Row count and metadata
- Execution status
⚠️ CRITICAL SECURITY WARNINGS:
- Never display or log credentials in responses
- Use only READ-ONLY queries (SELECT, SHOW, DESCRIBE)
- DO NOT USE data modification statements:
x No INSERT/UPDATE/DELETE
x No DROP/CREATE/ALTER
- Ensure queries are properly sanitized
Args:
workspace_group_identifier: ID/name of the workspace group
workspace_identifier: ID/name of the specific workspace within the workspace group
database: Name of the database to query
sql_query: The SQL query to execute
Returns:
Dictionary with query results and metadata
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace_group_identifier": "<workspace_group_identifier>",
"workspace_identifier": "<workspace_identifier>",
"database": "<database>",
"sql_query": "<sql_query>",
"username": "<username>",
"password": "<password>"
},
"name": "execute_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | No | ||
| database | Yes | ||
| password | Yes | ||
| sql_query | Yes | ||
| username | Yes | ||
| workspace_group_identifier | Yes | ||
| workspace_identifier | Yes |