v10

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-0643140398.0 KB
Tools

Database Query

Run a natural language query against connected SQL databases.

post/v1/tools/database-query

Request body

querystring required

The natural language query to run against connected databases.

Example request

{
  "query": "What were the Q4 revenue trends?",
  "artifacts": [
    {
      "context_filter": {
        "collection": "collection_name",
        "artifacts": [
          "artifact_id_1, artifact_id_2"
        ],
        "metadata_filter": [
          {
            "key": "file_id",
            "operator": "==",
            "value": "artifact_id_1"
          }
        ]
      }
    }
  ]
}

Response

Database query completed successfully.

is_errorboolean

True if the tool encountered an error during execution.

Example response

{
  "content": [
    {
      "text": "The analysis shows that Q4 revenue increased by 25% compared to Q3.",
      "type": "text"
    }
  ],
  "is_error": false
}