Create hard link
create_hardlinkCreate a hard link so an existing file appears under a second path on the same file system. Fails if the new name already exists; local disk, SFTP and NFS only.
Instructions
Create a hard link: a second name for an existing file. Use when: one file must appear under two paths. Instead: create_symlink for folders or across file systems; copy_file for a copy. Behavior: only adds. A repeat fails with 'File exists'. One file system; local disk, SFTP and NFS only. Refuses secret files. Time limit: 30 s. Returns: {ok: true}.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_hardlink"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | The existing file to link to; unlike symlink's target it is resolved like any path (absolute, or relative to the MCP root). Required unless target_b64 is given. | |
| backend | No | Backend id from list_backends; omit for the default. | |
| link_path | No | The new name; must not exist yet (absolute, or relative to the MCP root). Required unless link_path_b64 is given. | |
| target_b64 | No | target as base64 of its raw bytes, for non-UTF-8 names; replaces target. | |
| link_path_b64 | No | link_path as base64 of its raw bytes, for non-UTF-8 names; replaces link_path. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes |