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' = all public workspaces, 'all' = both; or one workspace_id.
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' (all public workspaces) or 'all'. | 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). |