Add Relationship
add_relationshipRecord a directed relationship between two story entities (e.g., characters, documents) to build the project's knowledge graph for querying connections.
Instructions
Record a typed, directed relationship between two story entities (e.g. a character "mentors" another, or a character "appears in" a document) in the project story graph. Returns the stored edge with its generated id. Use this to build the knowledge graph that find_relationships, character_network, and discover_connections then query. Requires an open project with the relationship engine initialized.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| head | Yes | Name of the source entity, e.g. a character name like "Elena". | |
| tail | Yes | Name of the target entity the relationship points to. | |
| headType | Yes | Type of the source entity. | |
| relation | Yes | The relationship verb/label from head to tail, e.g. "mentors", "appears_in". | |
| tailType | Yes | Type of the target entity. |