Skip to main content
Glama

jar_compile_java

Compile Java source code and optionally inject the compiled class into a JAR file. Use it to patch Java-based games by adding or replacing classes without manual build steps.

Instructions

Compile Java source code and optionally inject into JAR.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
classpathNoAdditional classpath entries
class_nameYesFully-qualified class name
session_idYesSession ID
source_codeYesJava source code
java_releaseNoJava release target (default: 21)
auto_classpathNoAuto-add JAR to classpath (default: true)
inject_into_jarNoInject compiled class into JAR (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, yet it omits key traits: the required session_id implies a pre-existing open JAR session (jar_open) that is never mentioned, and injecting a class into a JAR can overwrite existing entries — a destructive side effect left undisclosed. It also says nothing about permissions, failures, or what is returned.

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 front-loaded sentence with no wasted words is well structured. It is arguably too terse for a seven-parameter mutation tool, but every stated clause earns its place.

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?

For a compile-plus-inject tool with seven parameters, no annotations, and no output schema, the description is not complete enough: it omits session prerequisites, the overwrite risk of injection, and the classpath/auto_classpath interaction, all of which an agent needs to invoke it correctly.

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 all seven parameters are documented in the schema, establishing the baseline of 3. The description adds only the notion that injection is optional, which loosely maps to inject_into_jar (default true) but provides no syntax or format detail beyond 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?

The description states a specific verb (Compile) and resource (Java source code) and notes the optional JAR injection, so the core action is unambiguous. It does not, however, distinguish itself from the related compile_plugin sibling or clarify how compilation output is delivered without injection.

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 explicit when-to-use or when-not guidance, and no alternatives are named despite siblings like compile_plugin, build_and_deploy, and jar_scaffold_mod. The phrase 'optionally inject into JAR' hints at a use case but leaves the routing decision to inference.

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

Deploy Server

Other Tools