Skip to main content
Glama
HOI4 Agent Tools

HOI4 Agent Tools

by klimPaskov

Add or fix localisation

hoi4.localisation_write
Destructive

Add localisation keys or repair Hearts of Iron IV localisation files by fixing BOM, broken quotes, and missing languages, with a diff preview before writing changes.

Instructions

Add localisation keys (mode add: key and text; language, file, replace) or repair localisation files (mode fix: BOM, broken quotes, keys missing from supported languages). Game keys are overridden from a replace folder. apply false returns the diff and writes nothing; apply true writes it. Returns up to 10 files with diffs. Example: {"mode":"add","entries":[{"key":"my_focus","text":"My focus"}]}

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": {
      "mode": "<mode>"
    },
    "name": "hoi4.localisation_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNo
modeYes
applyNofalse returns the diff and writes nothing; true makes the same change.
fixesNo
pathsNo
entriesNo
replaceNo
languageNoenglish
requestKeyNo
workspaceIdNocurrent

Output Schema

NameRequiredDescriptionDefault
codeYes
dataYes
statusYes
blockersNo
artifactsNo
validationYes
diagnosticsNo
workspaceIdYes
changedFilesNo
filesScannedNo
proposedFilesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.21.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the safety bar is lower, yet the description still adds real context: dry-run is the default (apply false writes nothing), game keys are overridden from a replace folder, and output is capped at 10 files with diffs. It omits whether fixes mutate files in place irreversibly or whether backups exist, which matters for a destructive tool.

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?

The two modes, the dry-run default, and the replace-folder override are front-loaded in the opening sentences, followed by return behavior and a compact JSON example. Every clause adds information an invoker needs.

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?

Given a destructive, two-mode tool with 10 parameters, the definition covers both workflows, the dry-run default, replacement precedence, and the return shape (the output schema handles structure separately). What remains unstated is scoping behavior for paths and workspaceId, and any note on reversibility after apply=true.

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 description coverage is only 10%, so the description must carry the load, and it does: it explains mode, entries (key plus text), language, file, replace, apply, and the fixes categories behind the fix mode. paths, requestKey, and workspaceId receive no explanation in either the description or the schema, leaving a meaningful gap for a 10-parameter tool.

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?

The description states specific verbs and resources up front: it adds localisation keys (mode add) or repairs localisation files (mode fix), and names the concrete defect classes fix handles (BOM, broken quotes, missing languages). It never differentiates itself from the read-side sibling hoI4.localisation_inspect, so an agent must infer that this is the write path, which keeps it below a 5.

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?

It clearly partitions usage by mode: use add with key/text entries, use fix for BOM/quotes/missing-language repairs, and use apply=false first to preview. It stops short of explicit when-not guidance, such as advising an inspect pass before writing or warning against apply=true on a dirty workspace.

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