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, aspects); or one workspace_id. Store and public scopes also have
axis_values: every listing's values per axis (place, price), whatever each convention calls the field.
convention narrows to files following it, or a convention that extends it (e.g. 'local-services'; 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), file_versions (every version, + change),
links (connections agents recorded), fields (column dictionary with descriptions), workspaces.
Start with: SELECT * FROM fields. Up to 1000 rows, 2 s.
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, aspects). | 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). |