Skip to main content
Glama

jdx_body

Retrieve a JVM member's method body sliced verbatim with provenance, optionally adding signatures, line numbers, context lines, javadoc, or forcing a vineflower/javap reconstruction engine.

Instructions

Open the method: the source body of one member, sliced verbatim with provenance.

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_body"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
engineNoForce a reconstruction engine: vineflower or javap (default: paired sources first).
contextNoExtra lines around the body (default 0).
withDocNoAppend the member javadoc.
maxLinesNoCap the body slice (default 200).
workspaceNoNamed workspace to answer from (default: the workspace the server was started with). Stored workspaces only.
lineNumbersNoPrefix every line with its 1-based number.
withSignatureNoPrepend the member signature line.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does add real behavioral signal: the output is verbatim source (not reformatted), it is a slice (implying truncation, consistent with maxLines), and provenance is attached. However it never states that the operation is read-only, what the provenance looks like, or what happens when the member is not found.

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?

A single compact sentence with no filler, and the resource scope is front-loaded. The colon construction ("Open the method: ...") is slightly cryptic but not wasteful.

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 a read-only slice tool with eight fully documented parameters and no output schema, the description covers the core contract but leaves the return shape unexplained — the agent learns provenance exists yet not where it appears. Adequate rather than complete.

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%, so every one of the eight parameters is already documented in structured form, including defaults for context, maxLines, engine, and workspace. The description adds no parameter-level meaning beyond that, which is the expected baseline for a fully documented 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?

"Open the method: the source body of one member" states a specific verb and a specific resource slice, and "sliced verbatim with provenance" clarifies that raw source text is returned rather than a summary. It is clear enough to distinguish from a whole-file read or a signature lookup, though it never names those siblings explicitly.

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

Usage Guidelines2/5

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

There is no guidance on when to use this versus jdx_source, jdx_signature, jdx_members, or jdx_show. The agent must infer from the phrase "source body of one member" that this is the body-only tool. No exclusions, prerequisites, or conditions are stated.

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