Skip to main content
Glama

lint_mod

Read-onlyIdempotent

Check War Selection mod Lua code for syntax errors and known gameplay or visual pitfalls, using inline code or a cached mod ID, to catch issues before testing.

Instructions

Static check of mod Lua code (pass code, or mod_id of a cached mod): Lua 5.4 syntax plus known War Selection pitfalls (math.random in gameplay mods, missing root.f_recreateModifiedUnitTypes(), visual mods changing game state, math.atan2, removed/renamed functions, unknown addMod events, undefined handlers, unknown f_* names with suggestions). kind: auto | gameplay | visual. With mod_id, source: auto (draft if present, else cache) | draft | cache.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNo
kindNoauto
mod_idNo
sourceNoauto
versionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world behavior, so the bar is lower; the description still adds real substance by listing the specific pitfalls detected and noting that unknown f_* names come with suggestions. It omits return format and any limits on code size or mod cache.

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 action and input modes; the parenthetical pitfall list is dense but each item is informative rather than filler. Slightly run-on, but no wasted sentences.

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 5-parameter tool with 0% schema coverage and no output schema, the description covers input selection well enough to call it correctly. It leaves the `version` parameter and the shape of the diagnostic results unexplained, which is a modest gap.

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 0% and the schema has no enums, so the description carries the burden: it explains the code/mod_id alternatives, the kind values (auto|gameplay|visual) and the source values (auto|draft|cache). Only `version` is left undocumented.

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+resource ('Static check of mod Lua code') and then enumerates exactly what is checked (Lua 5.4 syntax plus War Selection pitfalls). An agent can immediately distinguish this from siblings like search_mod_code, diff_mod, or mod_impact.

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?

Gives invocation routing ('pass `code`, or `mod_id` of a cached mod') and the meaning of kind/source, which implies the use case, but never states when to reach for this tool versus alternatives such as mod_impact or read_log, nor any prerequisites.

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