Skip to main content
Glama

get_call_hierarchy_outgoing

Find all methods called by a Java method from a cursor position. Use it to understand dependencies and trace what a method invokes.

Instructions

Find all methods called by a method (outgoing calls).

USAGE: Position cursor on a method name OUTPUT: List of methods that this method calls

A call in a lambda written in the method is the method's call; a call in the body of an anonymous or local class declared in it is a call of that class's member, as get_call_hierarchy_incoming reports it. Creating an anonymous class, and its arguments, are calls of the method; the creation is a call of the superclass constructor the anonymous class's constructor runs (Object() for an interface), returning the anonymous class.

IMPORTANT: Uses ZERO-BASED coordinates.

Useful for understanding what a method depends on.

Requires load_project to be called first.

Input Schema

NameRequiredDescriptionDefault
lineYesZero-based line number
columnYesZero-based column number
filePathYesPath to source file

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.4
  2. Removedv1.3.3
  3. First observedv1.2.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the return shape, the load_project prerequisite, zero-based coordinates, and non-obvious edge-case semantics (lambda calls belong to the enclosing method, anonymous-class body calls do not, and class creation resolves to the superclass constructor). It omits error behavior when the cursor is not on a method, keeping it short of a 5.

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 a one-line purpose followed by clearly labelled USAGE/OUTPUT/IMPORTANT blocks, which is easy to scan. The lambda/anonymous-class paragraph is dense and somewhat hard to parse, but it encodes genuine edge-case behavior that would otherwise be missing.

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?

There is no output schema, so the description must explain returns and does so ('List of methods that this method calls'), plus it covers the load_project prerequisite and coordinate convention. It is nearly complete for a position-based query tool; only failure modes when no method is under the cursor are unaddressed.

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 coverage is 100% and both 'line' and 'column' are already documented as zero-based, so the description's 'IMPORTANT: Uses ZERO-BASED coordinates' largely restates structured data. 'Position cursor on a method name' adds minor semantic value by indicating the coordinates must point at a method identifier, so baseline 3 applies.

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 all methods called by a method') with the directional qualifier '(outgoing calls)' that cleanly separates it from the sibling get_call_hierarchy_incoming, which it names explicitly. An agent can tell the two apart without opening either schema.

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?

'USAGE: Position cursor on a method name' tells the agent the required precondition and 'Requires load_project to be called first' gives the ordering dependency. It also states the analytical use case ('understanding what a method depends on'). It lacks an explicit when-not, but the incoming sibling reference covers the main alternative.

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