delete_share
Revoke access to a Nextcloud share by ID without deleting the shared file or folder. Use it to remove or leave shares, including federated shares.
Instructions
Delete (unshare) a share by its ID.
This revokes access for the share recipient. The file/folder itself is not deleted. Called by the recipient on a share they received (list_shares with shared_with_me), it removes the share from their files instead: a share made directly to them is deleted for the owner too, a group share only stops showing up for them. Leaving a federated share tells the other server, except for a federated group share, which goes back to list_pending_shares instead, under the id it had in list_shares.
Args: share_id: The share ID to delete. Use list_shares to find share IDs. Pass federated share IDs as strings: they can be too long for a JSON number. federated: True to leave a federated share received from another server (federated: true in list_shares with shared_with_me). Those are numbered separately from this server's shares.
Returns: Confirmation message.
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": {
"share_id": "<share_id>"
},
"name": "delete_share"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| share_id | Yes | ||
| federated | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |