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, or a unit's vs, 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, or its vs for a unit saved by VS Data IDs, 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 } }, { "ranged": { "distance": 18 } }, or { "target": { "invulnerable": 4 } }. distance is the inches to the target: weapons that cannot reach it make no attacks and are marked outOfRange, and each weapon is within half range by its own Range. 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. Changed3 schema fields changed
    • changedInput schema / properties / modifiers / properties / all / properties / singleRerolls / items / enum
      Previous value: -[
      -  "hit",
      -  "wound",
      -  "damage"
      -]New value: +[
      +  "hit",
      +  "wound",
      +  "damage",
      +  "save"
      +]
    • changedInput schema / properties / modifiers / properties / melee / properties / singleRerolls / items / enum
      Previous value: -[
      -  "hit",
      -  "wound",
      -  "damage"
      -]New value: +[
      +  "hit",
      +  "wound",
      +  "damage",
      +  "save"
      +]
    • changedInput schema / properties / modifiers / properties / ranged / properties / singleRerolls / items / enum
      Previous value: -[
      -  "hit",
      -  "wound",
      -  "damage"
      -]New value: +[
      +  "hit",
      +  "wound",
      +  "damage",
      +  "save"
      +]
  2. Changed4 schema fields changed
    • addedInput schema / properties / attacker / properties / attached / items / properties / vs
      Added value: +{
      +  "description": "A get_my_roster pick's vs, unchanged, for a unit saved by VS Data IDs: it stands for the unit's models, choices and spreads, so pass it with the pick's entryId as unit and leave those out.",
      +  "properties": {
      +    "allegiance": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "enhancement": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "models": {
      +      "additionalProperties": {
      +        "maximum": 60,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "propertyNames": {
      +        "maxLength": 256,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "options": {
      +      "additionalProperties": {
      +        "additionalProperties": {
      +          "maximum": 60,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "propertyNames": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "propertyNames": {
      +        "maxLength": 256,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "warlord": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "models",
      +    "options"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / attacker / properties / vs
      Added value: +{
      +  "description": "A get_my_roster pick's vs, unchanged, for a unit saved by VS Data IDs: it stands for the unit's models, choices and spreads, so pass it with the pick's entryId as unit and leave those out.",
      +  "properties": {
      +    "allegiance": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "enhancement": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "models": {
      +      "additionalProperties": {
      +        "maximum": 60,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "propertyNames": {
      +        "maxLength": 256,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "options": {
      +      "additionalProperties": {
      +        "additionalProperties": {
      +          "maximum": 60,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "propertyNames": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "propertyNames": {
      +        "maxLength": 256,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "warlord": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "models",
      +    "options"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / defender / properties / attached / items / properties / vs
      Added value: +{
      +  "description": "A get_my_roster pick's vs, unchanged, for a unit saved by VS Data IDs: it stands for the unit's models, choices and spreads, so pass it with the pick's entryId as unit and leave those out.",
      +  "properties": {
      +    "allegiance": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "enhancement": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "models": {
      +      "additionalProperties": {
      +        "maximum": 60,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "propertyNames": {
      +        "maxLength": 256,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "options": {
      +      "additionalProperties": {
      +        "additionalProperties": {
      +          "maximum": 60,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "propertyNames": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "propertyNames": {
      +        "maxLength": 256,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "warlord": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "models",
      +    "options"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / defender / properties / vs
      Added value: +{
      +  "description": "A get_my_roster pick's vs, unchanged, for a unit saved by VS Data IDs: it stands for the unit's models, choices and spreads, so pass it with the pick's entryId as unit and leave those out.",
      +  "properties": {
      +    "allegiance": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "enhancement": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "models": {
      +      "additionalProperties": {
      +        "maximum": 60,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "propertyNames": {
      +        "maxLength": 256,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "options": {
      +      "additionalProperties": {
      +        "additionalProperties": {
      +          "maximum": 60,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "propertyNames": {
      +          "maxLength": 256,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "propertyNames": {
      +        "maxLength": 256,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "warlord": {
      +      "maxLength": 256,
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "models",
      +    "options"
      +  ],
      +  "type": "object"
      +}
  3. Changed3 schema fields changed
    • changedInput schema / properties / modifiers / properties / all / properties / singleRerolls / maxItems
      Previous value: -4New value: +12
    • changedInput schema / properties / modifiers / properties / melee / properties / singleRerolls / maxItems
      Previous value: -4New value: +12
    • changedInput schema / properties / modifiers / properties / ranged / properties / singleRerolls / maxItems
      Previous value: -4New value: +12
  4. Changed4 schema fields changed
    • changedInput schema / properties / modifiers / description
      Previous value: -"Situational 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."New value: +"Situational modifiers the simulator page offers, such as { \"all\": { \"cover\": true, \"hitModifier\": -1 } }, { \"melee\": { \"charged\": true } }, { \"ranged\": { \"distance\": 18 } }, or { \"target\": { \"invulnerable\": 4 } }. distance is the inches to the target: weapons that cannot reach it make no attacks and are marked outOfRange, and each weapon is within half range by its own Range. 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."
    • addedInput schema / properties / modifiers / properties / all / properties / distance
      Added value: +{
      +  "maximum": 200,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / modifiers / properties / melee / properties / distance
      Added value: +{
      +  "maximum": 200,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / modifiers / properties / ranged / properties / distance
      Added value: +{
      +  "maximum": 200,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  5. Changed3 schema fields changed
    • changedInput schema / properties / modifiers / properties / all / properties / singleRerolls / items / enum
      Previous value: -[
      -  "hit",
      -  "wound"
      -]New value: +[
      +  "hit",
      +  "wound",
      +  "damage"
      +]
    • changedInput schema / properties / modifiers / properties / melee / properties / singleRerolls / items / enum
      Previous value: -[
      -  "hit",
      -  "wound"
      -]New value: +[
      +  "hit",
      +  "wound",
      +  "damage"
      +]
    • changedInput schema / properties / modifiers / properties / ranged / properties / singleRerolls / items / enum
      Previous value: -[
      -  "hit",
      -  "wound"
      -]New value: +[
      +  "hit",
      +  "wound",
      +  "damage"
      +]
  6. 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"
  7. 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"
      +}
  8. Added

TDQS

A4.2/5.0
Behavior5/5

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

Far exceeds the annotations (readOnly/idempotent/non-destructive). It discloses the full tiebreak ranking order, what is held fixed (model counts, enhancements, detachment upgrades), the ranking mode semantics, the shape of the return (best/current, 'better', 'exhaustive' with notes), exclusion of unestimable rules named in notes, and a ~20 second runtime. This is exactly the behavioral context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded, but the body is a single run-on paragraph where the five-step tiebreak chain, fixed-element rules, return shape, and runtime are chained with commas and clauses. Every element is relevant, yet the lack of sentence/section breaks makes it harder to parse than the content justifies.

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 complex nested-schema tool with no output schema, the description covers return values, the 'better'/'exhaustive' semantics, fixed inputs, and runtime, which is nearly everything an agent needs. The main gap is that the large 'modifiers' object and analytics params are not addressed, though the schema itself documents modifiers in depth.

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

Parameters3/5

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

With schema coverage at 67%, the schema does much of the work. The description reinforces 'mode' (shooting then melee, or one phase) and explains that choices/spreads/vs are the search's starting point while counts and upgrades stay fixed, but it says nothing about modifiers, llm_model, or conversation_id, so a third of parameters remain undocumented in the prose.

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 and resource ('searches the attacking unit's legal wargear... for the loadout most likely to destroy the defender') and distinguishes itself from the sibling simulate_combat by noting it performs what 'the simulator's Optimize does' and consumes the same sides. An agent can tell this is a search/optimization tool rather than a single-run simulation.

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?

Gives clear context for when it applies: the attacker's choices and spreads (or a unit's vs) are the search start, fixed elements stay fixed, and output is 'ready for a roster pick or simulate_combat.' It references simulate_combat as the natural alternative but never states an explicit when-not or a decision rule for choosing between optimize and simulate.

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.