List Saved Queries
List the saved queries of a Draxlr database.
Tool: draxlr_list_saved_queries
Lists the saved queries for a database. Each entry includes the query id, name, description, its type (raw SQL or builder), and — for raw SQL queries — the SQL itself. Query-builder queries also include a tableId. Use the returned id as the queryId for Add Query to Dashboard, Run Saved Query or Export Query.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
databaseId | string | Yes | The database id (from List Databases) |
Example
"Show the saved queries in my Sales DB."
Arguments:
{
"databaseId": "665f1c2a9b1e4a0012ab34cd"
}
Response
{
"count": 2,
"queries": [
{
"id": "6690aa11bc2e4a0012cd77ee",
"databaseId": "665f1c2a9b1e4a0012ab34cd",
"type": "raw",
"url": "https://app.draxlr.com/explore/665f1c2a9b1e4a0012ab34cd/6690aa11bc2e4a0012cd77ee",
"name": "Orders by status",
"description": "Order counts grouped by status",
"rawQuery": "SELECT status, COUNT(*) AS orders FROM orders GROUP BY status",
"tableId": null,
"tags": ["orders"],
"folder": "665f1c2a9b1e4a0012abf001",
"createdAt": "2026-07-31T09:12:00.000Z"
},
{
"id": "6690ab42bc2e4a0012cd8123",
"databaseId": "665f1c2a9b1e4a0012ab34cd",
"type": "builder",
"url": "https://app.draxlr.com/explore/665f1c2a9b1e4a0012ab34cd/6368ffcce797f28cd531e431/6690ab42bc2e4a0012cd8123?saved=true",
"name": "Monthly revenue",
"description": "Revenue grouped by month",
"rawQuery": null,
"tableId": "6368ffcce797f28cd531e431",
"tags": ["orders"],
"folder": "665f1c2a9b1e4a0012abf001",
"createdAt": "2026-07-30T14:05:00.000Z"
}
]
}
| Field | Description |
|---|---|
id | The saved query id — use it as queryId when adding to a dashboard, running or exporting |
databaseId | The database the query belongs to |
type | raw (SQL) or builder (built in the Draxlr UI) |
url | A link to view the query in Draxlr |
name | The saved query name |
description | The saved query description |
rawQuery | The SQL, for raw SQL queries (null for builder queries) |
tableId | The table a builder query is based on (null for raw queries) |
tags | Tables referenced by the query |
folder | Id of the folder the query belongs to |
createdAt | When the query was saved |