attach_tool_database
Connects an existing database to an existing HTML tool so it can read and write rows, updating tool.meta.json and returning the database path and column IDs.
Instructions
Connect an EXISTING database (a folder of row documents with database.json) to an EXISTING HTML tool so it can read/write rows with await hillnote.database(name) -> rows()/add()/update()/remove()/onChange(). The user approves access once, in the app. Row ids are the row documents' filenames; setting title renames the row. Updates the tool's tool.meta.json (every other field kept; an entry with the same name is replaced). Returns the database path and its column ids.
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": {
"workspacePath": "<workspacePath>",
"database": "<database>"
},
"name": "attach_tool_database"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Optional category where the tool is located | |
| database | Yes | The database to connect | |
| toolName | No | The tool's folder name under resources/html/ | |
| toolPath | No | Alternative to toolName: the tool folder or its entry file, relative to the workspace root | |
| workspacePath | Yes | Absolute path to the workspace directory |