Link items as Related
zotero_relate_itemsLink pairs of Zotero library items as Related on both items, preserving existing relations and validating all keys before writing.
Instructions
Link pairs of library items as "Related", the link Zotero shows in an item's Related pane, on BOTH items of each pair, as Zotero itself does. Additive only: every relation an item already has (other Related links, merge records, any other predicate) is kept, and a pair already linked is reported as such and not written again. Both items must be in the same library. Every item is read before anything is written, so an unknown key refuses the whole call. Get candidates from zotero_suggest_related (pairs that cite each other), or pass any pairs you choose. To remove a link, edit relations with zotero_update_item. Writes go to the running Zotero desktop app (Zotero 10+) for every library it holds, otherwise to the cloud Web API. A personal library that has never synced to a zotero.org account cannot be linked from here: Zotero names it in the link by a local id neither API exposes.
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": {
"pairs": "<pairs>"
},
"name": "zotero_relate_items"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pairs | Yes | Pairs to link, at most 100. Order inside a pair does not matter; both items get the link. | |
| library_id | No | Numeric id of the library to address, e.g. 5234875 for a group (zotero_groups lists the ids you can reach). Omit to use the configured default library; an id given without library_type is read as a group id. | |
| library_type | No | Which library to address: "user" (a personal library) or "group" (a shared group library). Omit to use the library this server is configured for. "group" on its own is refused: pass library_id with it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | One entry per distinct item. | |
| failed | Yes | Items that failed. | |
| linked | Yes | Items whose relations were written. | |
| target | No | Where the write went: "local" (Zotero desktop local API), "desktop" (connector protocol) or "cloud" (Zotero Web API). |