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.
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. |