Skip to main content
Glama

Get Entity References

get_entity_references
Read-onlyIdempotent

Trace 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

TableJSON Schema
NameRequiredDescriptionDefault
entityNoRegistry id or name of a character/location to list the documents that mention it, e.g. "Elena". Mutually exclusive with documentId.
documentIdNoUUID of a document to list the entities it mentions (from get_structure). Mutually exclusive with entity.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityNoEchoed when querying by entity.
mentionsNoEntities the document references (present when querying by documentId).
documentsNoDocuments referencing the entity (present when querying by entity).
documentIdNoEchoed when querying by document.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark the tool as read-only and idempotent. The description adds behavioral details: exact whole-word case-insensitive matching, returns counts/offsets, empty results when no matches or registries empty, requires open project. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences cover purpose, dual usage, matching rules, prerequisites, and edge cases with no redundancies. Front-loaded with the primary function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists, the description sufficiently covers all behavioral aspects for both directions, matching constraints, prerequisites, and empty results. No gaps for this type of tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%. The description adds mutual exclusivity, explains 'registry id or name', mentions counts/offsets, ranking by count, and exact matching semantics, providing significant added value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Describes tracing reference graphs between documents and registered entities in two directions. Clearly distinguishes from sibling tools like find_mentions by specifying exact whole-word matching and registry-based lookup.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states to provide exactly one of documentId or entity, and explains the use case for each parameter. Does not mention specific alternatives among siblings, but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/writerslogic/scrivener-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server