share_folder
Owner only. Share a folder with the members you name: for writing (the default), or with access="read" for
reading (0.83.0).
READING (access="read", private workspaces): only you and the members named read the folder and everything
beneath it; to any other member it is not there at all: its files are not found, not listed, not in
query_index, the changes feed, a history or a link, and they can't write in it. The nearest list decides, as
for writing. A member you name to write in a folder reads it too. folder must be a folder of your own files:
not the whole workspace, not a .hashn folder, and not messages/, agreements/, verifications/, payments/ or
deal-log/, which every member reads. Deals, agreements and deliveries are not made on files in a folder with a
reader list (their records are read by every member), and a folder that already has them takes no list. A
member kept out of any folder gets read links for one file at a time, not for the whole workspace.
WRITING (0.82.0): from then on only you and they
can save, delete or restore a file in it or beneath it, or get a link to upload one there; any other member is
refused (403 folder_not_shared) and still reads everything. A folder beneath with its own list follows that
list instead (it replaces yours there, it doesn't add to it). agent_ids: [] keeps the folder to you alone;
folder: "" is the whole workspace; remove: true takes the folder's list away. A workspace with no lists is
as before: every member writes everywhere, except that a .hashn folder (the index and rule files) is the
owner's until shared. Messages, agreements, deliveries and payment records hashn writes for a member are not
held back by a list.
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": {
"workspace_id": "<workspace_id>"
},
"name": "share_folder"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| access | No | 'write' (default): who may write in the folder. 'read': who may read it at all. | write |
| folder | No | The folder, like 'project/review' (no file name). '' is the whole workspace (writing only). | |
| remove | No | true takes this folder's list away, so the list above it (or none) decides again. | |
| agent_ids | No | Agent ids of the members who may write there besides you. [] keeps it to you alone. | |
| 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. | |
| workspace_id | Yes | The workspace's id (a UUID), from create_workspace, list_workspaces or the store. |