Skip to main content
Glama
HOI4 Agent Tools

HOI4 Agent Tools

by klimPaskov

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HOI4_AGENT_CONFIGYesAbsolute path to the configuration file for hoi4-agent-tools

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Start with the matching inspect tool; use hoi4.probability_inspect for weights and timing. Find local documentation with hoi4.reference_context, hoi4.reference_search and hoi4.reference_read, and source definitions with hoi4.source_lookup. Rewrite tools edit mod source. For focus trees: plan lanes first, place with auto positions, render and look, read the layout verdict (revise and blocked mean not finished), then revise only the failing branch. Results describe offline source and scenario models, not observed game behavior. Unresolved states are not confirmed coverage. Read linked artifacts when summaries omit detail. Long operations support negotiated MCP tasks and hoi4.job_inspect/hoi4.job_cancel; background rewrites need a stable requestKey. This session lists the core tools; the map and advanced tools (world maps; focus, GUI, event, technology, probability and other editors) need HOI4_AGENT_TOOLS_PROFILES=core,map,advanced in the client's server entry.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tasks
{
  "list": {},
  "cancel": {},
  "requests": {
    "tools": {
      "call": {}
    }
  }
}
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
hoi4.localisation_writeA

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"}]}

hoi4.reference_searchA

Find a modding rule in the offline wiki and installed game docs by plain words or script name. Returns up to 10 short candidates (limit up to 12) with file, lines, revision and, for a command, a one-line meaning and its scopes. Pick the one that fits, since several commands sound alike, then read it with hoi4.reference_read using its id and revision. Example: {"query":"add_timed_idea"} or {"query":"make a country hold elections now"}.

hoi4.reference_readA

Read a documentation section returned by reference_search or reference_context. Pass its id and revision. Example: {"id":"","revision":""}. Returns at most 80 lines (40 by default) and 8,000 bytes, with a line to continue from.

hoi4.reference_contextA

Find documentation for the content you are building: events, decisions, ideas, focuses, technology, GUI, maps, localisation or AI. Example: {"surface":"event","question":"fire an event after a delay"}. Returns up to 16 short sections; read more with hoi4.reference_read.

hoi4.source_lookupB

Find where a script symbol is defined and used across the game, DLC and mod. Pass a symbol, or a file path and line. Example: {"symbol":"my_scripted_effect"}. Returns up to 3 definitions with source text and 10 usages; keyPath and view=structure navigate nested blocks.

hoi4.script_validateA

Find broken syntax, commands and scopes in an effect, trigger or mod file using the installed docs. Unknown helpers and native argument blocks stay unresolved. Example: {"source":"add_political_power = 10","kind":"effect","scope":"country"} or {"path":"events/a.txt"}. {"closure":true} instead counts whether the references of the whole mod resolve, per kind. Returns up to 12 findings.

hoi4.error_logA

Find errors from the last game launch and group them by category, with source files, lines and fix hints. Show which files changed since the log and which errors appeared after a relaunch; mod entries come first. Example: {"scope":"mod","category":"effect"}. Returns at most 20 entries (limit 50) with fix hints and which entries are new since the previous launch.

hoi4.explain_errorA

Explain error.log lines: the rule each one breaks, its file and line with the lines around it, and the fix, from a reviewed catalogue of the game's messages. Says whether the game documents the command a line names, and the closest documented names. Example: {"line":"Invalid trigger 'stability' in events/my_events.txt line : 12"}. Returns up to 20 explanations (10 lines).

hoi4.mod_healthA

Check a whole mod in one call: the last error.log, the engine check (unknown effects, triggers and modifiers, duplicate ids, broken overrides), script validation, and the localisation and asset audits. Returns the 10 problems that matter most, each counted with 2 examples, its fix and the tool to use next, and which audits ran. Example: {"limit":5} or {"checks":["error_log","engine_check"]}. Takes up to a minute on a large mod.

hoi4.script_guardA

Check the files you wrote for invented commands: every effect, trigger and modifier that the installed game documentation does not list and no loaded file defines, with its file, line and the closest real name. Checks the named paths, or the mod script files changed in the last 120 minutes. Needs hoi4-engine. Example: {"paths":["events/my_events.txt"]}. Returns up to 40 names.

hoi4.mod_indexA

Summarize the content in a mod or find a free event ID across the mod, game and dependencies. Use overview for descriptors, folders and definitions (the 50 busiest namespaces; pass a namespace or prefix to list those starting with it), or next_id with a namespace or prefix. Example: {"mode":"next_id","kind":"event","namespace":"my_mod"}. Returns a compact summary; the first call indexes the mod, which takes seconds on a large one.

hoi4.localisation_inspectA

Read localisation in every language the game and mod ship. key: one key per language with file, line and layer, the languages lacking it and the files mentioning it. audit: keys the mod uses that no language defines, keys missing from a supported language, keys defined twice in one language, and file problems. coverage: keys per language. Example: {"mode":"key","key":"my_event.1.t"} or {"mode":"audit"}. Returns counts per problem and a few examples of each.

hoi4.skillA

List the modding skills installed in the mod, or load one by name, at the kit version HOI4 Mod Setup pinned, with its hash. A file edited since Setup installed it is refused unless acceptLocalEdits. Example: {"name":"hoi4-events"}. Returns up to 20,000 bytes of text; continue from nextOffset.

Prompts

Interactive templates invoked by user choice

NameDescription
hoi4.probability_analysisOutline an analysis of AI choices, event timing, random chances or a custom weighted pool.

Resources

Contextual data attached and managed by the client

NameDescription
server-statusLive server processes sharing this server state, with memory, last client activity and execution limits.

TDQS

A3.9/5.0

Scored across 13 tools

Disambiguation4/5

Most tools have clearly distinct roles: reference_search/read/context form a discovery→read pipeline, error_log/explain_error/mod_health span finding→explaining→overall checking. The closest overlap is script_validate vs script_guard (both analyze scripts), but descriptions differentiate syntax/command validation from invented-name detection, so an agent can choose correctly.

Naming Consistency4/5

All names use a consistent hoi4. prefix and snake_case, so the convention is readable. There is minor variation in ordering—some are verb_noun (reference_search, script_validate, explain_error) while others are noun_verb (localisation_write, mod_health, error_log)—but no mixed casing or chaotic styles.

Tool Count5/5

13 tools is well within the sweet spot for a modding assistant toolkit. Each tool covers a distinct facet (docs, validation, errors, health, localisation, index, skills) and none feels redundant.

Completeness4/5

Strong lifecycle coverage: search/read docs, validate, guard against invented commands, diagnose launch errors, whole-mod health, localisation read/write, and indexing. The main gap is a general script-authoring/edit tool (only localisation_write exists), but core diagnosis and writing workflows are covered.

Maintenance

ActivityActive
ResponsivenessNo recent community issues