On-Chain SQL Query Check and Scan Estimate (ClickHouse, Not Executed)
omnial/onchain-sql-query-cost-estimate
Given a read-only ClickHouse SQL query over curated on-chain datasets such as Ethereum DEX trades, checks and estimates it without running it: whether it is accepted, the SQL as it would run, each table read with its columns and types and its source tables' keys, rows and bytes, the estimated parts, rows, marks and bytes to read, the scan budget, and guardrail warnings with a recommended action. No query rows are returned.
Price
Up to $0.0328 per call; you pay what the call used
The price shown is the price you pay. No monthly minimum. Top-ups start at $5.
Data source
Public blockchains
Blockchain data from public chains.
Use it
Five steps: search, inspect, learn, run, settle. No per-tool setup; your agent reaches this tool through the meta-tools it already has.
// 1. search: find the tool
omnial_search({ query: "what you need" })
// 2. inspect: price and input schema
omnial_inspect({ tool: "omnial/onchain-sql-query-cost-estimate" })
// 3. learn: read the usage guide at runtime
omnial_learn({ tool: "omnial/onchain-sql-query-cost-estimate" })
// 4. run: price the exact call first, then run it
omnial_execute({ tool: "omnial/onchain-sql-query-cost-estimate", input: { /* see input_schema */ }, dry_run: true })
omnial_execute({ tool: "omnial/onchain-sql-query-cost-estimate", input: { /* ... */ } })
// 5. settle: the call is charged when it finishes, nothing to doNot connected yet? Point your MCP client at https://mcp.eden-engine.com/mcp, then copy a config for your client.
Pricing
Every charge this tool can incur.
| Charge | Price |
|---|---|
Per call | $0.0328 |
- Updated
- Oct 17, 2026
Input and output schemas
Input schema
{
"type": "object",
"required": [
"sql"
],
"properties": {
"sql": {
"type": "string",
"minLength": 1,
"description": "A read-only ClickHouse SELECT or WITH query. Qualify every table as agent.<table>; always filter on block_date or block_number (the partition key); compare address columns directly against lowercase literals; do not filter on symbol columns; on transfer tables use separate UNION ALL branches instead of OR across from and to; use single quotes for strings."
},
"max_rows": {
"enum": [
100,
1000
],
"type": "integer",
"default": 1000,
"description": "The row limit written into the checked SQL: 100, or 1000 (the default)."
}
},
"additionalProperties": false
}Output schema
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"sql": {
"type": "string",
"description": "The query as sent."
},
"budget": {
"type": "object",
"properties": {
"max_rows_to_read": {
"type": "number"
},
"max_bytes_to_read": {
"type": "number"
},
"max_execution_time_seconds": {
"type": "number"
}
},
"description": "The scan caps a run of the query would be held to."
},
"tables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"table": {
"type": "string"
},
"engine": {
"type": "string"
},
"columns": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "A column name."
},
"type": {
"type": "string",
"description": "The column's ClickHouse type."
}
}
}
},
"database": {
"type": "string"
},
"physical_sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"table": {
"type": "string"
},
"engine": {
"type": "string"
},
"database": {
"type": "string"
},
"total_rows": {
"type": "number"
},
"primary_key": {
"type": "string"
},
"sorting_key": {
"type": "string"
},
"total_bytes": {
"type": "number"
},
"partition_key": {
"type": "string"
}
}
},
"description": "The stored tables behind it."
}
}
},
"description": "Each table the query reads."
},
"accepted": {
"type": "boolean",
"description": "Whether the query passed the checks."
},
"estimate": {
"type": "object",
"properties": {
"rows": {
"type": "number"
},
"bytes": {
"type": "number"
},
"marks": {
"type": "number"
},
"parts": {
"type": "number"
},
"by_table": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rows": {
"type": "number"
},
"bytes": {
"type": "number"
},
"marks": {
"type": "number"
},
"parts": {
"type": "number"
},
"table": {
"type": "string"
},
"database": {
"type": "string"
}
}
}
}
},
"description": "The estimated read, overall and per source table."
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"severity": {
"type": "string"
},
"recommended_action": {
"type": "string"
}
}
},
"description": "Guardrail warnings."
},
"executed_sql": {
"type": "string",
"description": "The query as it would run, with the row limit and read caps added."
}
}
}
},
"description": "The query check and scan estimate, as returned after shaping."
}