Skip to main content
Glama

jdx_usages

Finds usages of a type or member across workspace jars and source directories, with filters for reference kind, annotation values, and artifact labels.

Instructions

Find usages of a type or member across the workspace jars and source dirs. With kind=annotation, query may use annotation-use spelling '@Type(k=v)' (issue #26).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "jdx_usages"
  }
}

Input Schema

NameRequiredDescriptionDefault
inNoOnly matches from artifacts whose label matches this glob.
kindNoEdge kind: all, call, read, write, ref, new, throw (throws declarations, not ATHROW sites) or annotation (default all).
limitNoMaximum rows shown (default 50); the rest become a truncation footer.
queryYesThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
whereNoComma-separated annotation value predicates key=value (requires kind=annotation; e.g. forRemoval=true). Equivalent: query='@Type(k=v)' with kind=annotation. Issue #26.
contextNoSnippet lines around each hit (default 0).
excludeNoSkip matches from artifacts whose label matches this glob.
workspaceNoNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, and it discloses very little beyond purpose: no statement that the tool is a read-only query, no cost or performance expectation for scanning jars, no description of result rows or the truncation behavior. Only the annotation-spelling special case is genuine behavioral disclosure.

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?

Two sentences, purpose first, special case second — nothing structurally wasteful. The dangling 'issue #26' tracker reference adds no meaning to the caller and slightly muddies an otherwise tight second sentence.

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

Completeness3/5

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

For an eight-parameter search tool with no output schema and no annotations, the definition says what it finds but not what comes back or how to read the results, leaving the agent to infer row shape and truncation from the schema alone. Adequate but with clear gaps given the tool's complexity.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds the cross-parameter relationship worth knowing (the '@Type(k=v)' query spelling is coupled to kind=annotation, mirroring the where predicate), but formats and defaults stay with the schema.

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?

States a specific verb and resource ('Find usages of a type or member') plus the search scope ('across the workspace jars and source dirs'), which an agent can act on directly. It does not, however, distinguish itself from plausible siblings such as jdx_callers or jdx_calls, so the boundary has to be inferred.

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

Usage Guidelines3/5

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

The second sentence gives a concrete usage rule for one mode: with kind=annotation the query may use the '@Type(k=v)' spelling. Beyond that there is no when-to-use / when-not framing and no guidance about choosing this over caller- or reference-oriented siblings.

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