create_saved_query
Save SQL text as a reusable query in SQL Lab, associated with a database and optional schema.
Instructions
Create a new saved SQL query in SQL Lab.
Saved queries persist reusable SQL snippets associated with a database.
Args: label: Name / label for the saved query. sql: The SQL text to save. database_id: ID of the database this query targets. schema: Optional schema context (e.g. 'public'). description: Optional description of the query. dry_run: If True, preview the action without executing.
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": {
"label": "<label>",
"sql": "<sql>",
"database_id": "<database_id>"
},
"name": "create_saved_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | ||
| sql | Yes | ||
| database_id | Yes | ||
| schema | No | ||
| description | No | ||
| dry_run | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |