Appearance
For agents
An agent can learn CQL from this handbook in two plain-text files, and check its reading against rows that queries really returned.
The two files
Both are at the handbook's own address, beside its pages.
/llms.txtopens with where to start: the CQL primer and the MCP server. Then it lists every page of the handbook, in the sidebar's order, each with the one sentence that says what it is for. Read it first to find the page you need./llms-full.txtis every page in full, the primer first, each under its address. The pictures are replaced by what they show, and everything else is the page as a reader sees it.
Both are written from the pages every time the handbook is built, so they say what the pages say.
Every table of rows was returned
The handbook's tests parse every query in the handbook. Every table of rows under a query is the rows that query returned against the chain, at the blocks it names. So an agent that writes a query from these pages can compare what it gets with what the page shows. The same query at the same blocks returns the same rows.
When a query is refused
When heto refuses a query, it returns diagnostics: a code, a message and where in the text the problem is. Diagnostic codes lists every code with what causes it and what to do. That is usually enough to fix the query and run it again. Errors and diagnostics explains how to read one.
Running queries
heto has a remote MCP server, so an agent can check a query and run it itself. Give your client this address:
https://staging-api.heto.dev/mcpIn Claude Code, for example, run claude mcp add --transport http heto https://staging-api.heto.dev/mcp.
The server signs you in with OAuth. The first time your client connects, it opens a consent page in your browser. There you sign in to heto and choose what the client may do:
cql:readlets it read the handbook, check queries, look up contracts, chains and your ABI library, and read your runs.cql:runlets it run queries. A run spends your credits, as it does in the workbench.
The server's first message to the client is the CQL primer, which teaches the language and the loop: read the primer, describe the contract, check the query, run it, then page the rows.