Skip to main content
Glama

jdx_source

Retrieves full source or a line slice for a JVM type or symbol with provenance, enabling inspection of method bodies and references from jars, Maven coordinates, or the JDK.

Instructions

Open the file: whole source for a type, or a slice of it, 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_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesNoLine window A:B (1-based, inclusive).
queryYesThe symbol reference, type, pattern or glob the command asks about. Quote refs containing # or (). Empty only where the command allows it (ls, tree).
aroundNoCenter the slice on this member ref.
engineNoForce a reconstruction engine: vineflower or javap (default: paired sources first).
contextNoExtra lines around the slice (default 0).
maxLinesNoCap the 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.0

TDQS

C2.5/5.0
Behavior2/5

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

No annotations are present, and the description only vaguely mentions 'with provenance'. It does not disclose whether this is a read-only operation, how errors are handled, or what the output format includes. Behavioral details are largely absent.

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

Conciseness3/5

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

The description is a single sentence, which is concise but too brief for an 8-parameter tool. It is front-loaded but lacks necessary detail.

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

Completeness2/5

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

With 8 parameters and no output schema, the description is incomplete. It does not explain how to combine parameters or what the returned source includes beyond provenance.

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 the schema documents all parameters. The description adds no meaning beyond the schema, so the baseline of 3 is appropriate.

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

Purpose3/5

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

The description states it opens a file to retrieve source for a type, either whole or a slice, with provenance. It gives a specific verb and resource, but does not differentiate from siblings like jdx_body or jdx_show, leaving ambiguity about when this tool is preferred.

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?

No guidance is provided on when to use this tool versus alternatives such as jdx_body or jdx_show. The agent must infer its role from the terse description.

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