Skip to main content
POST
/
v1
/
tools
/
database-query
{
"content": [
{
"type": "text",
"text": "The total revenue for Q4 was $3.5M, with the highest contributions from the Sales department."
}
],
"is_error": false
}

Body

application/json

Request body for querying connected SQL databases using natural language. Requires at least one SQL database artifact in the tool context.

Request body for database query using the tool.

query
string
required

The natural language query to run against connected databases.

Examples:

"What were the Q4 revenue trends?"

artifacts
Artifacts · array
required

List of SQL database artifacts to query against. At least one artifact of type 'sql_database' is required.

  • FileArtifact
  • UriArtifact
  • TextArtifact
  • IngestedArtifact
  • SqlDatabaseArtifact

Response

Database query completed successfully.

Response returned from tool-based operations.

content
Content · array
required

List of content blocks generated by the tool. Blocks can include plain text, citations, source attributions, or images.

  • TextBlock
  • ImageBlock
  • AudioBlock
  • BinaryBlock
  • ResourceLinkBlock
  • ResourceBlock
  • SourceBlock
  • ToolUseBlock
  • ThinkingBlock
  • TLDRBlock
is_error
boolean
default:false

True if the tool encountered an error during execution.