Skip to main content
Glama
@adhisang/minecraft-modding-mcp

@adhisang/minecraft-modding-mcp

by adhi-jp

source-read

Read-only

Read Java source for 1-50 Minecraft, dependency, or mod-jar classes as member outlines, line snippets, or full files to inspect code without exporting it.

Instructions

Read the Java source of 1-50 classes from one artifact (Minecraft, dependency or mod jar): a member outline (mode metadata), a line window (snippet) or the whole file (full). Read-only; source-export writes files. Example: {"target":{"kind":"version","version":"1.21.10"},"classes":["net.minecraft.world.item.Item"],"mode":"snippet"}

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": {
      "target": "<target>",
      "classes": "<classes>"
    },
    "name": "source-read"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNometadata: member outline; snippet: source, 200 lines unless a range or maxLines is set; full: whole source. Default: snippet when startLine, endLine or maxLines is set, else metadata.
targetYesFields per kind (?=optional): artifact: artifactId; version: version,projectPath?,scope?; jar: jarPath; coordinate: coordinate; workspace: projectPath,scope?; dependency: group,name,dependencyVersion|projectPath. Other fields rejected.
classesYes1-50 fully qualified class names, e.g. ["net.minecraft.world.item.Item"].
endLineNoOne class only.
mappingNoNamespace of the class names; default the artifact's.
maxCharsNoPer class; mode metadata default 40000.
maxLinesNo
startLineNoOne class only.
allowDecompileNoAllow source decompilation on this call; default true.
withProvenanceNoAdd provenance, qualityFlags and artifactContents per class.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv9.0.0-rc.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, and the description reinforces the read/write split against source-export. It adds nothing about decompilation cost or failure, the 50-class cap's performance implications, or truncation behavior when maxChars is hit, which are the real behavioral risks here.

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

Conciseness5/5

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

Three tight sentences: scope first, mode taxonomy second, safety/alternative third, then a compact example. No sentence is redundant and the most decision-relevant information is front-loaded.

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?

With no output schema, the description does tell the agent what each mode yields (member outline vs. line window vs. whole file), which is the key return-shape information. It leaves decompilation fallbacks and provenance flags to the schema, which is acceptable given 90% coverage.

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 90%, so the schema already documents mode, target kind fields, and line windows richly. The description's worked example illustrates the nested target form but adds no semantics the schema lacks; baseline 3 is appropriate.

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 (read Java source of 1-50 classes from one artifact), enumerates the three output modes with their meaning, and explicitly names the boundary against source-export. An agent can distinguish it from siblings without opening the 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?

Names the closest alternative and its distinguishing condition ("source-export writes files"), which is exactly the routing decision an agent faces. It stops short of saying when not to use it, e.g. locating a class you cannot name (class-find) or searching text (source-search).

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