create_relation
Create typed semantic relations between entities to model alliances, locations, causes, and other connections in a book's world. Specify source, target, relation type, and strength.
Instructions
Create a semantic relation between two entities
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": {
"bookId": "<bookId>",
"sourceId": "<sourceId>",
"sourceType": "<sourceType>",
"targetId": "<targetId>",
"targetType": "<targetType>",
"type": "<type>"
},
"name": "create_relation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Relation type, e.g. 'allies_with', 'located_in', 'caused' | |
| bookId | Yes | Book ID | |
| sourceId | Yes | Source entity ID | |
| strength | No | Relation strength 1-10, default 5 | |
| targetId | Yes | Target entity ID | |
| sourceType | Yes | ||
| targetType | Yes | ||
| description | No | ||
| inverseType | No | Inverse relation type, e.g. 'has_ally', 'contains' |