Skip to main content
Glama

Find usages

find_usages

Lists every read, write, and use of a switch, variable, item, map, or database record and flags dead ends before renaming, deleting, or reusing an ID.

Instructions

Lists everywhere one switch, variable, item, weapon, armor, skill, state, actor, class, enemy, troop, common event or map is read, written or used, and warns about dead ends. Use it before renaming, deleting or reusing an id. reads: page conditions, Conditional Branch (111), variable operands and \V[n] text escapes; writes: Control Switches/Variables (121/122), Change Items/Weapons/Armors (126-128), Change Party Member (129), Change State/Skill (313/318), set-switch route steps; uses: Transfer Player (201), Common Event (117), Battle Processing (301), shops (302/605), actor commands, enemy drops and actions, class learnings, actor equipment, troop members, item/skill effects, map encounter lists, System startMapId and partyMembers. It reads staged changeset data. Each location is a string: 'Map003 event 5 page 1 command index 12', 'CommonEvent 4 command index 7', 'Troop 2 page 1 command index 3', 'Enemies #4 dropItems', 'System startMapId', 'Map003 encounterList'. Map ids, event ids, common event ids and troop ids are the real ids and pages are 1-based like the editor shows them, but 'command index N' is the 0-based position in the command list (the index lint_events reports). A location without a command index is a page condition. counts are the true totals; each list is cut at limit entries and truncated gives the omitted counts. warnings cover: a switch or variable that is read but never set, or set but never read; a common event never called (autorun and parallel common events are exempt); a map nothing transfers to; and an id with no name or record (unknown id, not an error). Script commands (355), plugin commands (356), variable-designated transfers and battles, notetags and plugin parameters are not understood, so every 'never ...' warning carries a note when the project has script or plugin commands (or truncated range commands) that could act on the id. Only the 121/122 ids up to 1000 per command are indexed.

Input Schema

NameRequiredDescriptionDefault
idYesId of the switch, variable, database record, common event or map.
kindYesWhat to look up.
limitNoMost locations listed per role (reads, writes, uses).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.1

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the whole burden and does so: it discloses that it reads staged changeset data, that counts are true totals while lists truncate at limit, exactly which warning classes are produced, and which constructs (355/356, variable-designated transfers/battles, notetags, plugin params, ids above 1000) are not understood and therefore weaken "never" warnings. This is precisely the caveat an agent needs to avoid over-trusting results.

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?

Front-loaded with purpose and a use-before-mutating rule, then scoping, then location-string format, then limitations — a sensible order. The exhaustive command-code enumerations (111, 121/122, 126-128, 313/318, 301/302/605) are dense and somewhat redundant with the opening kind list, but each block adds real coverage information.

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?

There is no output schema, and the description compensates fully: it gives exact location string forms ('Map003 event 5 page 1 command index 12', 'System startMapId'), defines index/pagination conventions including 0-based command index vs 1-based pages, and describes the shape of counts, truncated and warnings.

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 100%, so the baseline is 3; the description goes beyond it by explaining that an id with no name or record yields an 'unknown id' rather than an error, and that each per-role list is cut at limit with omitted counts reported via truncated. It does not spell out the kind enum values beyond the opening enumeration, but the schema covers those.

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?

Opens with a specific verb and resource: lists every place one switch/variable/record is read, written or used, plus dead-end warnings. The enumerated kinds and the read/write/use taxonomy make it unmistakably distinct from siblings like check_references, search_records or lint_events.

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?

"Use it before renaming, deleting or reusing an id" gives a concrete trigger condition for calling it. It does not explicitly name competing alternatives (check_references, search_records) or state when not to use it, so it stops short of a full routing rule.

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