Skip to main content
Glama
pz-modding-mcp

pz-modding-mcp

by MrMikojo

pz_lua_search

Search Project Zomboid game files for plain text and return file:line matches, helping you see how the game uses a function or event.

Instructions

Search the game's own files for text (plain text, not a regex) and get file:line plus the line. folder = "lua" (media/lua, default), "scripts" (media/scripts) or "all" (all of media). Use it to see how PZ itself uses a function or event; then show_lua_function to read one function.

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

Input Schema

NameRequiredDescriptionDefault
textYes
folderNolua
max_hitsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/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 disclose meaningful traits: literal-substring matching rather than regex, scoping of the search root via folder, and the file:line result format. It omits any statement about case sensitivity, index freshness (relevant given a pz_rebuild_indexes sibling), or what happens when hits exceed max_hits.

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: purpose and match semantics first, parameter scoping second, chaining guidance last. No filler, and the most decision-relevant facts are front-loaded.

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?

Simple read-only search tool with only three parameters and an output schema that covers return values, so the description needn't explain results. Combined with the folder enumeration and the sibling hand-off, an agent has everything needed to call it correctly.

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

Parameters5/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 and largely does: it enumerates the folder values with their underlying paths ("lua" = media/lua, "scripts" = media/scripts, "all" = all of media) and marks lua as the default. This is exactly the information absent from the schema, and text/max_hits are either self-evident or minor.

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 ("Search the game's own files for text"), immediately clarifies the match semantics ("plain text, not a regex"), and names the return shape ("file:line plus the line"). It also distinguishes itself from the sibling show_lua_function, which it points to for the follow-up read.

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 a concrete use case ("see how PZ itself uses a function or event") and an explicit next step ("then show_lua_function to read one function"), which routes the agent well. It doesn't state when NOT to use this tool or how it differs from generic file-listing siblings such as pz_source, so it falls short of a full 5.

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