Skip to main content
Glama

build-preview_generation

Preview generator output from a project's Exeris metadata without writing files, returning added, changed, unchanged and removed files with diffs and decoded diagnostics.

Instructions

Preview what the code generator would write for this project's current metadata (target/classes/exeris-metadata), without writing anything into the project. It runs the project's own generator in a separate process — for 'ts' the @exeris/codegen-ts installed in the project's node_modules, confined by Node's permission model to write only its scratch directory; for 'java' the eu.exeris:exeris-codegen-cli jar from the local Maven repository at the version the project pins — never downloaded and never substituted; when none resolves, a structured generator_unavailable with a reason and remedy. Returns the files it produced as added, changed, unchanged and removed against the committed generated tree (src/main/generated/java for Java, the codegen outputPath for TypeScript), a unified diff for each added or changed file, and the run's diagnostics with every EXT- identifier decoded as build-explain_diagnostic does. 'unchanged' includes hand-written files already in the committed tree, which the run starts from; the generator's own manifest file is not listed. Unlike the present:false answers of the other build-* tools, this one cannot answer without metadata, so a project that has not been built returns the error metadata_missing: run the project build first (mvn compile). Metadata whose names could not be a Java identifier or a package are refused as metadata_invalid before any generator starts. Bounded by a timeout and by output and file-size caps; a run over one is stopped and the limit is named. Local only; the output exists in a temporary directory removed when the call returns.

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>"
    },
    "name": "build-preview_generation"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYesWhich generator to run: 'java' (exeris-codegen-cli) or 'ts' (exeris-gen).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.0

TDQS

A4.6/5.0
Behavior5/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 so thoroughly: subprocess isolation, Node permission confinement to a scratch directory, jar resolved from the local Maven repo at the pinned version (never downloaded or substituted), generator_unavailable with reason and remedy, metadata_missing/metadata_invalid failure modes, timeout and output/file-size caps with the limit named, and a temp directory removed on return. It also discloses what gets destroyed/omitted — the manifest file is not listed — which nothing else in the definition states.

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?

The core purpose is front-loaded in the first sentence and each clause carries information, but the body is a dense single block where return-shape, failure modes, and resource limits run together. Splitting those into sentences would cost nothing and speed scanning.

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

Completeness5/5

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

There is no output schema, and the description more than compensates: it enumerates the result shape (added/changed/unchanged/removed), the unified diffs per file, the diagnostics with EXT- identifiers decoded, edge cases like hand-written files counting as unchanged, and every error path. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the enum already labels both values, so the baseline is 3. The description adds real meaning beyond that: 'ts' resolves to @exeris/codegen-ts in the project's node_modules, 'java' to the eu.exeris:exeris-codegen-cli jar at the version the project pins, and the fallback behavior when neither resolves.

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 — preview what the code generator would write for this project's metadata — and immediately draws the line against actual writing ('without writing anything into the project'). It also distinguishes itself from siblings by contrast ('Unlike the present:false answers of the other build-* tools'), so an agent can tell what it is and is not 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?

Gives concrete preconditions for use: metadata must exist, so an unbuilt project returns metadata_missing and the build (mvn compile) must run first; invalid metadata names are refused as metadata_invalid. It contrasts behavior with other build-* tools rather than naming an explicit alternative for this capability, which is the only gap.

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