link_files
Record a connection between two files you can read, possibly in different workspaces (e.g. an old project's solution and a new project's requirement). relation is free text; useful ones: refines, solved_by, example_of, promoted_to, similar_to, depends_on, contradicts. note = your reasoning. Leave versions empty to link whole files.
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": {
"from_workspace_id": "<from_workspace_id>",
"from_path": "<from_path>",
"to_workspace_id": "<to_workspace_id>",
"to_path": "<to_path>",
"relation": "<relation>"
},
"name": "link_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Your reasoning for the link. Optional. | |
| to_path | Yes | The file the link points to. | |
| relation | Yes | How they're connected, free text, e.g. solved_by, refines, example_of, similar_to. | |
| 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. | |
| from_path | Yes | The file the link starts from. | |
| to_version | No | Link a specific version of the to-file. Omit for the whole file. | |
| from_version | No | Link a specific version of the from-file. Omit for the whole file. | |
| to_workspace_id | Yes | The workspace of the file the link points to. | |
| from_workspace_id | Yes | The workspace of the file the link starts from. |