Datasets
TOOLrun_sql
A read-only PostgreSQL SELECT over the financial, market and alt-data tables.
- Coverage
- US / CN / JP
- Billing
- Per call · 0.1 cr / call
Input parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| sql | string | required | One SELECT statement. No CTEs — use subqueries. Period columns are text in YYYY-MM form; compare them as strings. |
Example
Arguments
{
"sql": "SELECT ticker, fiscal_year, period_end, revenue, net_income FROM financial_statements WHERE ticker = 'AAPL' AND fiscal_period = 'FY' ORDER BY fiscal_year DESC LIMIT 3"
}Response
{
"columns": ["ticker", "fiscal_year", "period_end", "revenue", "net_income"],
"rows": [
["AAPL", "2025", "2025-09", 416161000000, 112010000000],
["AAPL", "2024", "2024-09", 391035000000, 93736000000],
["AAPL", "2023", "2023-09", 383285000000, 96995000000]
],
"rowCount": 3
}Limits
| Limit | Value | Past it |
|---|---|---|
| Rows per query | 100 Free / Plus · 500 Ultra / Enterprise | First N rows, truncated: true, plus a notice |
| Statement time | 10 s | Fails with a timeout hint |
| Queries in flight | 5 per user | Fails with a retry-after hint |
Errors
Invalid arguments are refused before the tool runs; the rest arrive as a tool failure whose text is the message. The four shapes are on MCP server.
| When | You get | Do |
|---|---|---|
| Not a single SELECT (CTE, several statements, a write) | "Only SELECT queries are allowed" | One SELECT, subqueries instead of WITH; not charged |
| Column misspelt | The error plus the full schema of every table named | Retry with a listed column |
| Table misspelt | "relation … does not exist" | Find the name with list_tables or get_table_schema |
| Table not public | "permission denied" and a note not to retry | Use the discovery tools |
| Table with its own tool (content_signals) | Refused with a pointer | Use news_search |
| Timeout | "Query timed out (>10s)" | Filter by ticker or date; no leading-wildcard ILIKE |
Notes
- Filter structured tables by ticker. For screening across the universe add ticker NOT LIKE '%-%' to drop preferred shares.
- Quote symbols containing "." or "^" — 6758.T, ^GSPC — as string literals.
- price_volume_history must be filtered by ticker and time_frame; the other required filters are stated per table by get_table_schema.
Endpoint, client setup and billing are common to all tools. For details, please refer to MCP server.