Skip to main content
Glama

Find Entity References

find_entity_references

Identify which Drupal bundles contain reference fields pointing to a specific entity type. Filter results by bundle or field name to see where references can exist.

Instructions

Find which bundles use reference fields targeting an entity type.

Answers "where are these used?" at the configuration level: for entity_type ("taxonomy_term", "node", "media", ...) it lists every field on every bundle whose storage targets that type, e.g. which content types have a tags or category field. Filter by the referencing bundle or by field_name.

This reads field configuration, not content: it reports where references can live, not which individual rows currently point at which entity. For the data, query the field's table with db_query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
bundleNo
field_nameNo
entity_typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries full burden and discloses a genuinely important trait: it reads field configuration, not content, reporting where references *can* live rather than current rows. It does not mention permissions, auth requirements, or pagination behavior, but the critical config-vs-data distinction is clearly surfaced.

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?

Front-loaded with the core purpose, then progressively narrows to scope, filters, and the config/content boundary. Every sentence earns its place; the closing db_query pointer is actionable rather than filler.

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?

For a 4-param read tool with an output schema covering return values, the description supplies purpose, usage boundaries, filter semantics, and the config-vs-content caveat. Nothing an agent needs to invoke it correctly is missing.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate, and it does for entity_type (with examples 'taxonomy_term', 'node', 'media'), bundle, and field_name, explaining that bundle/field_name act as filters. Only 'limit' is left unaddressed, though its meaning is self-evident.

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?

States a specific verb and resource: 'Find which bundles use reference fields targeting an entity type.' The example ('which content types have a tags or category field') makes the abstract purpose concrete, and the config-vs-content framing differentiates it from data-oriented siblings like db_query.

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

Usage Guidelines5/5

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

Explicitly scopes usage ('Answers "where are these used?" at the configuration level') and names the alternative for the other case: 'For the data, query the field's table with db_query.' The when-to-use and when-not-to-use conditions are both stated.

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

Deploy Server

Other Tools