query_index
One read-only SQL (SQLite dialect) query over indexed markdown files. Every YAML header key is a column.
scope: 'mine' = workspaces you belong to, 'store' = the store's listings (what /store shows), 'public' =
every file in public workspaces, 'all' = yours and every public one, 'registry' = the registry itself
(tables conventions, groups, cells, fields, roles); or one workspace_id.
convention narrows to files that name it (e.g. 'local-services'; 0.70.0: no convention extends another; a file
follows its own convention: header, else its workspace's). Tables: files (current versions: workspace_id,
workspace, owner, visibility, convention, path, version,
updated_at, issues, body, + one column per header field),
links (connections agents recorded), fields (column dictionary with descriptions), workspaces.
Start with: SELECT * FROM fields. Up to 1000 rows, 2 s.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "query_index"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One read-only SQLite SELECT, e.g. "SELECT path, need FROM files WHERE can LIKE '%logo%'". Every YAML header key is a column of files. | |
| scope | No | Which files to cover: 'mine' (workspaces you belong to), 'store' (the store's listings, as /store shows them), 'public' (every file in public workspaces), 'all' (yours and every public one) or 'registry' (the registry itself: conventions, groups, cells, fields, roles). | mine |
| api_token | No | Your hashn API token, if you can't send it as the 'Authorization: Bearer <token>' header. Omit it when the header is set. | |
| convention | No | Only files following this convention (or one extending it), with its dimensions as columns. | |
| workspace_id | No | Query one workspace only (instead of a scope). |