Skip to main content
Glama
HOI4 Agent Tools

HOI4 Agent Tools

by klimPaskov

Find definitions and usages

hoi4.source_lookup
Read-onlyIdempotent

Locate script symbol definitions and usages across game, DLC, and mod files by symbol or file path and line, returning source context for navigation and debugging.

Instructions

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "hoi4.source_lookup"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNo
lineNo
pathNo
viewNosource
columnNo
symbolNo
keyPathNo
fromLineNo
maxLinesNo
fromColumnNo
childOffsetNo
maxChildrenNo
workspaceIdNocurrent
maxReferencesNo
maxDefinitionsNo
expectedRevisionNo
includeReferencesNo

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

B3.4/5.0
Behavior4/5

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

Annotations already declare this a read-only, idempotent, non-destructive, closed-world operation, so the safety profile is covered. The description adds genuinely new behavioral context: search scope spans game, DLC and mod, results are truncated to at most 3 definitions and 10 usages (so output can be incomplete), and view=structure plus keyPath switch into nested-block navigation. It omits concurrency semantics such as expectedRevision, which would have earned a 5.

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?

Three tight sentences, front-loaded with the purpose, followed by input modes, a runnable example, and result semantics. The inline JSON example earns its space for a tool with this many parameters. Minor cost: the result-cap sentence is dense and folds several distinct ideas together.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-shape explanation is not required, and the description correctly focuses on inputs and navigation modes. But with 17 parameters at zero schema coverage and no mention of workspace scoping or revision pinning, an agent cannot confidently use much of the surface area. Adequate for the common symbol-lookup path, incomplete for the rest.

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

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 17 parameters, so the description must carry the full burden. It explains only symbol, path/line, keyPath and view; kind, column, fromLine/fromColumn, maxLines, childOffset, maxChildren, workspaceId, includeReferences, maxReferences and expectedRevision are left entirely unexplained. For a 17-parameter tool this is a substantial shortfall, though the keyPath/view note does add real meaning beyond the schema.

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?

States a specific verb and resource: find where a script symbol is defined and used, across game/DLC/mod scope. An agent immediately understands the operation. It does not, however, distinguish itself from the similarly-named reference_search sibling, so the differentiation piece is missing.

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?

"Pass a symbol, or a file path and line" gives the two input modes and therefore implies when each applies, plus a concrete example call. There is no explicit when-not guidance and no pointer to an alternative tool (e.g. reference_search or script_validate) for adjacent lookup tasks.

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