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

ParameterTypeRequiredDescription
databaseIdstringYesThe 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"
    }
  ]
}
FieldDescription
idThe saved query id — use it as queryId when adding to a dashboard, running or exporting
databaseIdThe database the query belongs to
typeraw (SQL) or builder (built in the Draxlr UI)
urlA link to view the query in Draxlr
nameThe saved query name
descriptionThe saved query description
rawQueryThe SQL, for raw SQL queries (null for builder queries)
tableIdThe table a builder query is based on (null for raw queries)
tagsTables referenced by the query
folderId of the folder the query belongs to
createdAtWhen the query was saved