Skip to main content
Glama
pz-modding-mcp

pz-modding-mcp

by MrMikojo

pz_api

Retrieve Project Zomboid's Java API for Lua: look up public methods and fields on game objects, including argument and return types, by class, class.member, or member name.

Instructions

Project Zomboid's Java API, from the installed game's jar: the public methods and fields Lua can call on PZ objects, with argument and return types. name = a class ("IsoPlayer": its members and its parents'), "Class.member" ("IsoPlayer.getStats", parents count too), or a member name alone ("getModData": every class that has it). Lua calls methods with a colon: player:getStats().

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

Input Schema

NameRequiredDescriptionDefault
nameYes
max_hitsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It does disclose the data source (the installed game's jar, implying read-only introspection of a static index) and that parent classes are traversed in both class and Class.member lookups, but it says nothing about mutation risk, caching/staleness, or truncation behavior. The output schema covers the return shape, so that omission is acceptable.

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?

Content is front-loaded with the core definition first, then the argument forms, then a practical calling note; there is little filler. The block is dense but every sentence about `name` forms earns its place, though a line about `max_hits` would have been a better use of space than the Lua colon reminder.

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?

For a simple two-parameter lookup with an output schema, the definition is largely sufficient: it explains what is returned and precisely how the primary argument is interpreted, including inheritance behavior. The one real gap is `max_hits`, which matters for unbounded member-name queries where results could be truncated.

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 0%, so the description must document both parameters. It thoroughly covers `name` with three accepted forms and worked examples ('IsoPlayer', 'IsoPlayer.getStats', 'getModData'), but never mentions `max_hits` or its default of 40, leaving the result-cap behavior undocumented for broad queries like a bare member name.

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: it exposes the Project Zomboid Java API (public methods and fields callable from Lua) with argument and return types, sourced from the installed game's jar. This is enough to separate it from siblings like pz_lua_search or pz_source, which are not API-surface lookups.

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?

The description explains how to address the API via the `name` argument (bare class, Class.member, or bare member name) and gives a concrete Lua call example, which implies how the tool is used. It never states when to prefer this over pz_lua_search or pz_source, so routing between siblings is left to inference.

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