Tools · Services
sql
Changes thingsQuery a SQL database. Reads by default; set allow_writes=True to enable mutations.
When to use: Use when the user's question is answered by rows in a relational database. Explore with list_tables / describe_table first if the schema is unknown.
Example
The call
{
"tool": "sql",
"arguments": {
"action": "query",
"sql": "SELECT region, SUM(amount) FROM orders GROUP BY region"
}
}Needs pip install 'shipit-agent[sql]' and a database URL
So it isn't run here, and no output is shown: nothing on this page is made up.
Parameters
| Name | Type | Description |
|---|---|---|
| action* | string | What to do: query (SELECT), execute (mutate; requires allow_writes=True), list_tables, describe_table, schema_summary.queryexecutelist_tablesdescribe_tableschema_summary |
| sql | string | SQL statement. Required for action=query and action=execute. Prefer :named parameters over concatenation. |
| params | object | Named parameters substituted into :name placeholders. |
| table | string | Table name (required for action=describe_table). |
| schema | string | Optional schema/database qualifier for describe_table. |
| limit | integer | Cap for action=schema_summary (default 50). |
* required
More in Services
Work in GitHub, Slack, Jira, Linear, Notion, Google, Stripe and more.