Skip to main content
Glama
pz-modding-mcp

pz-modding-mcp

by MrMikojo

pz_source

Retrieves decompiled Java source for a Project Zomboid class or method from your local game jar, so you can read real overloads and code to understand the game's behavior.

Instructions

What a PZ Java method actually does: its decompiled code, made on your PC from your own game jar with CFR (off unless PZ_MCP_CFR is set). cls = "IsoPlayer" or "zombie.characters.IsoPlayer"; method = a name (all its overloads) or "" for the class outline. For understanding PZ only: never copy PZ code into a mod.

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": {
      "cls": "<cls>"
    },
    "name": "pz_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
clsYes
methodNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that code is decompiled locally on the user's machine from their own jar and that the capability is gated behind an environment variable. It stops short of describing the failure/empty-result behavior when CFR is unavailable, which matters for a conditionally-enabled tool.

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?

Front-loaded with the core purpose in the first clause, then parameter semantics, then the usage restriction. Dense and largely waste-free, though the parenthetical about CFR is slightly tacked-on mid-sentence.

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?

An output schema exists so return values need not be explained, and given that, the description covers purpose, input formats, the local-decompilation prerequisite, and the legal/usage restriction. Only the disabled-state behavior is unaddressed for an otherwise well-scoped two-parameter tool.

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 0%, so the description must compensate. It adds genuinely useful meaning: cls accepts either a simple name or a fully qualified one with an example, and method accepts a name (returning all overloads) or an empty string for the class outline. That covers both params, but the default value and exact matching/case behavior are left implicit.

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?

States a specific resource and verb-like action: the decompiled Java source of a PZ method/class, produced locally from the user's own game jar via CFR. An agent can tell it returns actual code vs. an API listing. It does not explicitly name a sibling to contrast with (e.g. pz_api or show_lua_function), so 4 rather than 5.

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

Usage Guidelines3/5

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

Provides a real usage boundary: 'For understanding PZ only: never copy PZ code into a mod,' and notes the feature is off unless PZ_MCP_CFR is set. What's missing is when to prefer this over pz_api/pz_lua_search or what to do when decompilation is disabled — the agent must infer the alternative.

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