Get Entity References
get_entity_referencesTrace references between documents and characters/locations. Provide a document ID to list its cast and settings, or an entity name to find all documents mentioning it.
Instructions
Trace the reference graph between documents and registered characters/locations, in either direction. Pass documentId to list the entities a document mentions (its cast and settings, with counts and offsets); pass entity (registry id or name) to list every document that mentions it, ranked by count. Provide exactly one of documentId or entity. Exact whole-word, case-insensitive matching against the registries — no AI. Returns empty when there are no matches or the registries are empty. Requires an open project.
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": "get_entity_references"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity | No | Registry id or name of a character/location to list the documents that mention it, e.g. "Elena". Mutually exclusive with documentId. | |
| documentId | No | UUID of a document to list the entities it mentions (from get_structure). Mutually exclusive with entity. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity | No | Echoed when querying by entity. | |
| mentions | No | Entities the document references (present when querying by documentId). | |
| documents | No | Documents referencing the entity (present when querying by entity). | |
| documentId | No | Echoed when querying by document. |