attach_tool_sheet
Connect a data sheet to an existing HTML tool so it can persist records instead of losing them in the tool sandbox. Creates a new sheet with defined columns or links an existing one, updating the tool's metadata.
Instructions
Connect a Sheet to an EXISTING HTML tool so it can persist records with await hillnote.sheet(name) — e.g. when moving a tool off localStorage, which does not persist in the tool sandbox. With sheet.columns, creates a new sheet at documents/Tools/ owned by the tool; with only sheet.name, connects an existing sheet found by its name or folder name (the user approves access once, in the app). Updates the tool's tool.meta.json (every other field kept; an entry with the same name is replaced). Additive — never deletes sheets or rows. Returns the sheet path and its column ids — key rows by column id. For a new tool, pass sheets to add_html_tool instead.
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>",
"sheet": "<sheet>"
},
"name": "attach_tool_sheet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet | Yes | The sheet to attach: { name, columns? } — with columns it is created, without it an existing sheet is connected | |
| category | No | Optional category where the tool is located | |
| toolName | No | The tool's folder name under resources/html/ (category folders are searched when category is omitted) | |
| toolPath | No | Alternative to toolName: the tool folder or its entry file, relative to the workspace root (e.g. "resources/html/expense-tracker") | |
| workspacePath | Yes | Absolute path to the workspace directory |