Skip to main content
Glama

find_references

Read-only

Find all references (where-used) to classes, methods, tables, enums, EDTs, and labels for impact analysis before refactoring.

Instructions

Find all references (where-used) to a class, method, field, table, enum, EDT, or LABEL. Essential for impact analysis before refactoring. For a method, SCOPE it to its declaring type — pass "Owner.method" (e.g. "SalesTable.initFromSalesQuotationTable"), set ownerName alongside a bare method name, or pass an AOT path ("/Tables/SalesTable/Methods/initFromSalesQuotationTable"). A bare method name (no owner) matches that name on every type and over-reports. For a label, pass the label id as targetName (e.g. "@WAX2194" or "@MyLabelFile:MyLabel"); results span every referencing object type (tables, forms, EDTs, enums, reports, menu items, …), not just code, and require the xref database (DYNAMICSXREFDB, full server mode).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of references to return
ownerNameNoDeclaring table/class/form that owns the method, when targetName is the bare method name. Scopes the where-used to that single type.
targetNameYesTarget name. Methods: see the scoping rule in the description above. Labels: the id exactly as written — "@WAX2194" or "@LabelFile:LabelId".
targetTypeNoType of the target to search for. Use "label" for label where-used (or just pass an "@…" / "/Labels/@…" targetName).all

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.14.0
    • changedInput schema / properties / targetName / description
      Previous value: -"Target name. Method where-used: qualify as \"Owner.method\" or pass an AOT path \"/Tables/<Table>/Methods/<method>\" for a result scoped to one declaring type (matches Visual Studio xref). A bare method name is name-only and over-reports. Label where-used: pass the label id exactly as written — old format \"@WAX2194\" or new format \"@LabelFile:LabelId\" (e.g. \"@ApplicationPlatform:AbortButtonText\")."New value: +"Target name. Methods: see the scoping rule in the description above. Labels: the id exactly as written — \"@WAX2194\" or \"@LabelFile:LabelId\"."
  2. First observedv1.8.0

TDQS

A4.4/5.0
Behavior5/5

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

While annotations declare readOnlyHint=true and openWorldHint=false, the description independently adds valuable behavioral context: results for labels span 'every referencing object type,' not just code, and the tool 'requir[es] the xref database (DYNAMICSXREFDB, full server mode).' It also discloses the over-reporting hazard of unscoped method namesstantive behavioral traits beyond the annotations.

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

Conciseness4/5

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

The description is a single dense paragraph, but every sentence earns its place by covering purpose, critical scoping rules, label usage, and a prerequisite. It is front-loaded with the core purpose and immediately moves to actionable guidance. Slight structure improvements are possible, but the length is justified by the tool's complexity.

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

Completeness4/5

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

For a tool with no output schema, the description covers the key operational contexts: impact analysis, method scoping pitfalls, label behavior across object types, and xref database dependency. It does not describe the response format or pagination, but given the detailed usage and behavioral guidance, an agent has enough context to invoke the tool correctly.

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?

The schema already has 100% coverage, but the description adds significant semantic nuance beyond it. It explains how targetName and ownerName interact for methods, gives concrete examples like 'SalesTable.initFromSalesQuotationTable', and clarifies label syntax ('@WAX2194') plus the use of targetType 'label'. This materially enriches the parameter documentation.

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

Purpose4/5

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

The description clearly states the tool's function: 'Find all references (where-used) to a class, method, field, table, enum, EDT, or LABEL.' This is specific and uses a precise verb+resource combination that distinguishes it from a general search. It does not explicitly contrast itself with sibling tools like search, but the where-used scope is unmistakable.

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?

The description provides outstanding usage guidance, including when to use it ('Essential for impact analysis before refactoring') and how to handle tricky cases. It explicitly warns that a bare method name 'over-reports' and tells the agent exactly how to scope correctly via Owner.method, ownerName, or an AOT path. It also gives clear label input syntax and notes the xref database requirement, leaving little room for misuse.

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