Skip to main content
Glama

Find the best loadout against a unit

optimize_loadout
Read-onlyIdempotent

Searches the attacking unit's legal wargear, with any attached leaders, for the loadout most likely to destroy the defender, then the most models destroyed, then the most wounds, then the most optional wargear that costs no points and replaces nothing, then the fewest choices changed from the start, as the simulator's Optimize does. Takes the same sides as simulate_combat; the attacker's choices and spreads are where the search starts, and model counts, enhancements and detachment upgrades stay fixed. mode ranks shooting followed by melee (combined), or one phase. Returns best and current, each with every attacking unit's choices and spreads ready for a roster pick or simulate_combat (a group left out keeps its default), its wargear by name, the weapon modes it used, and its odds; better says whether best beats current, or ties it while adding free wargear. exhaustive is true only when every legal loadout was checked; otherwise notes say why a better one may exist. Loadouts with rules the simulator cannot estimate are left out and named in notes. Takes up to about 20 seconds.

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": {
      "attacker": "<attacker>",
      "defender": "<defender>"
    },
    "name": "optimize_loadout"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoWhat to rank by: shooting followed by melee (combined), shooting alone (ranged), or melee alone.combined
attackerYes
defenderYes
llm_modelNoThe model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics.
modifiersNoSituational modifiers the simulator page offers, such as { "all": { "cover": true, "hitModifier": -1 } }, { "melee": { "charged": true } }, or { "target": { "invulnerable": 4 } }. commandReroll spends one Command Re-roll per phase on the first failed hit, wound, or save roll, or the first single-die Attacks roll below its average; compare with a run without it to judge the CP.
conversation_idNoThe conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changed
    • addedInput schema / properties / attacker / properties / attached / items / properties / choices / additionalProperties / anyOf
      Added value: +[
      +  {
      +    "maxLength": 64,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "const": "",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / attacker / properties / attached / items / properties / choices / additionalProperties / maxLength
      Removed value: -64
    • removedInput schema / properties / attacker / properties / attached / items / properties / choices / additionalProperties / minLength
      Removed value: -1
    • removedInput schema / properties / attacker / properties / attached / items / properties / choices / additionalProperties / type
      Removed value: -"string"
    • addedInput schema / properties / attacker / properties / choices / additionalProperties / anyOf
      Added value: +[
      +  {
      +    "maxLength": 64,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "const": "",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / attacker / properties / choices / additionalProperties / maxLength
      Removed value: -64
    • removedInput schema / properties / attacker / properties / choices / additionalProperties / minLength
      Removed value: -1
    • removedInput schema / properties / attacker / properties / choices / additionalProperties / type
      Removed value: -"string"
    • addedInput schema / properties / defender / properties / attached / items / properties / choices / additionalProperties / anyOf
      Added value: +[
      +  {
      +    "maxLength": 64,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "const": "",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / defender / properties / attached / items / properties / choices / additionalProperties / maxLength
      Removed value: -64
    • removedInput schema / properties / defender / properties / attached / items / properties / choices / additionalProperties / minLength
      Removed value: -1
    • removedInput schema / properties / defender / properties / attached / items / properties / choices / additionalProperties / type
      Removed value: -"string"
    • addedInput schema / properties / defender / properties / choices / additionalProperties / anyOf
      Added value: +[
      +  {
      +    "maxLength": 64,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "const": "",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / defender / properties / choices / additionalProperties / maxLength
      Removed value: -64
    • removedInput schema / properties / defender / properties / choices / additionalProperties / minLength
      Removed value: -1
    • removedInput schema / properties / defender / properties / choices / additionalProperties / type
      Removed value: -"string"
  2. Changed2 schema fields changed
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "The model identifier you are running as, for example \"claude-opus-4-8\" or \"gpt-5.2\". Pass \"unknown\" if you are not certain. Recorded for the server developer's analytics.",
      +  "type": "string"
      +}
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds substantial behaviour beyond them: a ~20-second runtime budget, the meaning of the exhaustive flag ('true only when every legal loadout was checked'), the notes field explaining why a better loadout may exist, and the exclusion of loadouts with rules the simulator cannot estimate. These are non-obvious operational traits an agent could not infer from the schema.

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?

Purpose is front-loaded in the first clause, and every sentence carries substantive information with no filler. The long semicolon-chained tiebreak sequence makes it a dense single paragraph that is harder to scan than a short list would be.

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?

There is no output schema, and the description compensates fully: it enumerates the returned fields (best and current with choices, spreads, named wargear, weapon modes, odds), explains the better and exhaustive booleans, and documents the notes escape hatch for unmodellable rules. That is everything an agent needs to interpret results and decide whether to re-run or verify with simulate_combat.

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?

With 67% schema coverage the baseline is around 3, but the description adds real meaning by stating which inputs are search variables (attacker choices and spreads) versus fixed (model counts, enhancements, detachment upgrades), and by explaining that mode ranks shooting then melee or a single phase. It does not mention the situational modifiers block, so the large nested parameter set is only covered by the schema itself.

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?

The description gives a specific verb and resource ('searches the attacking unit's legal wargear, with any attached leaders') plus an explicit objective and a fully enumerated ranking/tiebreak order (destroy defender → models destroyed → wounds → free wargear → fewest changes). It also names its sibling, simulate_combat, and states how it differs: search starts from that tool's attacker choices and spreads.

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 places the tool relative to simulate_combat ('takes the same sides as simulate_combat; the attacker's choices and spreads are where the search starts') and states that the output is ready for simulate_combat or a roster pick, which implies the search-then-verify workflow. It also bounds scope ('model counts, enhancements and detachment upgrades stay fixed') and runtime ('up to about 20 seconds'), though it never says explicitly when to prefer simulate_combat over this tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources