Skip to main content
Glama

Estimate combat between two units

simulate_combat
Read-onlyIdempotent

Runs Praetorium's exact combat simulator for one attacking unit, with any attached leaders, against one defending unit: shooting, melee, and shooting followed by melee. Returns expected models destroyed, expected wounds lost, the chance to destroy the unit, cumulative odds, weapons used, the wargear each unit fielded, the rule and weapon-mode choices each side can change, datasheet citations, and a simulator link. Each unit takes its default loadout unless given choices and spreads; to field a unit from get_my_roster, pass its pick's entryId as unit with the pick's models, choices and spreads, its attached picks under attached, and the roster's detachment. Units start at full strength unless modelsLost or woundsLost say otherwise. Passive datasheet rules apply by default; stratagems and conditional rules, including below-strength ones, stay off until chosen in rules. A modifier never chooses a rule: charged and heavy change only weapon abilities such as [LANCE] and [HEAVY], so a rule whose option needs the unit to have charged or remained stationary must also be chosen. Rules the simulator cannot calculate are never approximated: a phase it cannot estimate has status refused with its reasons, and recognised rules it leaves out are listed under notCalculated, so explain those gaps rather than retrying. Errors are reserved for unknown factions or units, illegal unit sizes, wargear, attachments, enhancements, or losses, and unavailable reference data. A weapon choice left out of weaponModes takes the option that does most against this defender. A side fields a detachment's rules and offers its stratagems only when its detachment is named, an enhancement applies only when named for its unit or among its choices, and another unit's aura applies only when that unit is listed in nearby and its rule chosen. The simulator link keeps loadouts but opens every unit at full strength.

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": "simulate_combat"
  }
}

Input Schema

NameRequiredDescriptionDefault
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.
weaponModesNoWeapon mode choices by key from a previous result, such as a frag or krak profile or which melee weapon a model fights with; a choice left out takes the option that does most against the defender.
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. Changed16 schema fields changed
    • addedInput schema / properties / attacker / properties / attached / items / properties / choices
      Added value: +{
      +  "additionalProperties": {
      +    "maxLength": 64,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "description": "Wargear choices, choice key to option id from get_unit_options or a get_my_roster pick: pass that pick's entryId as unit with its models, choices and spreads unchanged. An enhancement among them needs the side's detachment named. Omitted, the unit takes its default loadout.",
      +  "propertyNames": {
      +    "maxLength": 400,
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / attacker / properties / attached / items / properties / modelsLost
      Added value: +{
      +  "description": "Models already destroyed; at least one must remain, so leave out a destroyed attached unit. Refused when its models carry different wargear, since which ones fell is unknown.",
      +  "maximum": 59,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / attacker / properties / attached / items / properties / spreads
      Added value: +{
      +  "additionalProperties": {
      +    "additionalProperties": {
      +      "maximum": 60,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "propertyNames": {
      +      "maxLength": 64,
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "description": "How many models take each option of a choice group, choice key to {option id: count}, for groups get_unit_options sets with spreads.",
      +  "propertyNames": {
      +    "maxLength": 400,
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / attacker / properties / attached / items / properties / woundsLost
      Added value: +{
      +  "description": "Wounds lost by the unit's one wounded model, fewer than its Wounds; damage-state rules follow it on a lone model.",
      +  "maximum": 99,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / attacker / properties / choices
      Added value: +{
      +  "additionalProperties": {
      +    "maxLength": 64,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "description": "Wargear choices, choice key to option id from get_unit_options or a get_my_roster pick: pass that pick's entryId as unit with its models, choices and spreads unchanged. An enhancement among them needs the side's detachment named. Omitted, the unit takes its default loadout.",
      +  "propertyNames": {
      +    "maxLength": 400,
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / attacker / properties / modelsLost
      Added value: +{
      +  "description": "Models already destroyed; at least one must remain, so leave out a destroyed attached unit. Refused when its models carry different wargear, since which ones fell is unknown.",
      +  "maximum": 59,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / attacker / properties / spreads
      Added value: +{
      +  "additionalProperties": {
      +    "additionalProperties": {
      +      "maximum": 60,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "propertyNames": {
      +      "maxLength": 64,
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "description": "How many models take each option of a choice group, choice key to {option id: count}, for groups get_unit_options sets with spreads.",
      +  "propertyNames": {
      +    "maxLength": 400,
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / attacker / properties / woundsLost
      Added value: +{
      +  "description": "Wounds lost by the unit's one wounded model, fewer than its Wounds; damage-state rules follow it on a lone model.",
      +  "maximum": 99,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / defender / properties / attached / items / properties / choices
      Added value: +{
      +  "additionalProperties": {
      +    "maxLength": 64,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "description": "Wargear choices, choice key to option id from get_unit_options or a get_my_roster pick: pass that pick's entryId as unit with its models, choices and spreads unchanged. An enhancement among them needs the side's detachment named. Omitted, the unit takes its default loadout.",
      +  "propertyNames": {
      +    "maxLength": 400,
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / defender / properties / attached / items / properties / modelsLost
      Added value: +{
      +  "description": "Models already destroyed; at least one must remain, so leave out a destroyed attached unit. Refused when its models carry different wargear, since which ones fell is unknown.",
      +  "maximum": 59,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / defender / properties / attached / items / properties / spreads
      Added value: +{
      +  "additionalProperties": {
      +    "additionalProperties": {
      +      "maximum": 60,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "propertyNames": {
      +      "maxLength": 64,
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "description": "How many models take each option of a choice group, choice key to {option id: count}, for groups get_unit_options sets with spreads.",
      +  "propertyNames": {
      +    "maxLength": 400,
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / defender / properties / attached / items / properties / woundsLost
      Added value: +{
      +  "description": "Wounds lost by the unit's one wounded model, fewer than its Wounds; damage-state rules follow it on a lone model.",
      +  "maximum": 99,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / defender / properties / choices
      Added value: +{
      +  "additionalProperties": {
      +    "maxLength": 64,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "description": "Wargear choices, choice key to option id from get_unit_options or a get_my_roster pick: pass that pick's entryId as unit with its models, choices and spreads unchanged. An enhancement among them needs the side's detachment named. Omitted, the unit takes its default loadout.",
      +  "propertyNames": {
      +    "maxLength": 400,
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / defender / properties / modelsLost
      Added value: +{
      +  "description": "Models already destroyed; at least one must remain, so leave out a destroyed attached unit. Refused when its models carry different wargear, since which ones fell is unknown.",
      +  "maximum": 59,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / defender / properties / spreads
      Added value: +{
      +  "additionalProperties": {
      +    "additionalProperties": {
      +      "maximum": 60,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "propertyNames": {
      +      "maxLength": 64,
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "description": "How many models take each option of a choice group, choice key to {option id: count}, for groups get_unit_options sets with spreads.",
      +  "propertyNames": {
      +    "maxLength": 400,
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / defender / properties / woundsLost
      Added value: +{
      +  "description": "Wounds lost by the unit's one wounded model, fewer than its Wounds; damage-state rules follow it on a lone model.",
      +  "maximum": 99,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  4. Changed7 schema fields changed
    • addedInput schema / properties / attacker / properties / attached / items / properties / enhancement
      Added value: +{
      +  "description": "Enhancement name from list_units for the side's detachment, given to this unit's character; it needs that detachment named.",
      +  "maxLength": 400,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / attacker / properties / enhancement
      Added value: +{
      +  "description": "Enhancement name from list_units for the side's detachment, given to this unit's character; it needs that detachment named.",
      +  "maxLength": 400,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / attacker / properties / nearby
      Added value: +{
      +  "description": "Friendly units near this one but not joined to it, such as a character whose aura reaches it. Their abilities that can affect this unit are offered as rules, off until chosen; the simulator link leaves them out.",
      +  "items": {
      +    "properties": {
      +      "enhancement": {
      +        "description": "Enhancement name from list_units for the side's detachment, given to this unit's character; it needs that detachment named.",
      +        "maxLength": 400,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "faction": {
      +        "description": "Defaults to the unit's faction.",
      +        "maxLength": 160,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "unit": {
      +        "description": "Unit id, slug, name, or referenceId from list_units.",
      +        "maxLength": 400,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "unit"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 3,
      +  "type": "array"
      +}
    • addedInput schema / properties / defender / properties / attached / items / properties / enhancement
      Added value: +{
      +  "description": "Enhancement name from list_units for the side's detachment, given to this unit's character; it needs that detachment named.",
      +  "maxLength": 400,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / defender / properties / enhancement
      Added value: +{
      +  "description": "Enhancement name from list_units for the side's detachment, given to this unit's character; it needs that detachment named.",
      +  "maxLength": 400,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / defender / properties / nearby
      Added value: +{
      +  "description": "Friendly units near this one but not joined to it, such as a character whose aura reaches it. Their abilities that can affect this unit are offered as rules, off until chosen; the simulator link leaves them out.",
      +  "items": {
      +    "properties": {
      +      "enhancement": {
      +        "description": "Enhancement name from list_units for the side's detachment, given to this unit's character; it needs that detachment named.",
      +        "maxLength": 400,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "faction": {
      +        "description": "Defaults to the unit's faction.",
      +        "maxLength": 160,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "unit": {
      +        "description": "Unit id, slug, name, or referenceId from list_units.",
      +        "maxLength": 400,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "unit"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 3,
      +  "type": "array"
      +}
    • changedInput schema / properties / weaponModes / description
      Previous value: -"Weapon mode choices by key from a previous result, such as a frag or krak profile."New value: +"Weapon mode choices by key from a previous result, such as a frag or krak profile or which melee weapon a model fights with; a choice left out takes the option that does most against the defender."
  5. Changed3 schema fields changed
    • addedInput schema / properties / modifiers / properties / all / properties / singleRerolls
      Added value: +{
      +  "items": {
      +    "enum": [
      +      "hit",
      +      "wound"
      +    ],
      +    "type": "string"
      +  },
      +  "maxItems": 4,
      +  "type": "array"
      +}
    • addedInput schema / properties / modifiers / properties / melee / properties / singleRerolls
      Added value: +{
      +  "items": {
      +    "enum": [
      +      "hit",
      +      "wound"
      +    ],
      +    "type": "string"
      +  },
      +  "maxItems": 4,
      +  "type": "array"
      +}
    • addedInput schema / properties / modifiers / properties / ranged / properties / singleRerolls
      Added value: +{
      +  "items": {
      +    "enum": [
      +      "hit",
      +      "wound"
      +    ],
      +    "type": "string"
      +  },
      +  "maxItems": 4,
      +  "type": "array"
      +}
  6. 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 } }."New 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."
    • addedInput schema / properties / modifiers / properties / all / properties / commandReroll
      Added value: +{
      +  "enum": [
      +    "attacks",
      +    "hit",
      +    "wound",
      +    "save",
      +    "damage"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / modifiers / properties / melee / properties / commandReroll
      Added value: +{
      +  "enum": [
      +    "attacks",
      +    "hit",
      +    "wound",
      +    "save",
      +    "damage"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / modifiers / properties / ranged / properties / commandReroll
      Added value: +{
      +  "enum": [
      +    "attacks",
      +    "hit",
      +    "wound",
      +    "save",
      +    "damage"
      +  ],
      +  "type": "string"
      +}
  7. Changed2 schema fields changed
    • addedInput schema / properties / attacker / properties / detachment
      Added value: +{
      +  "description": "Detachment id, slug, or name from list_units, to field its rules and offer its stratagems; omit it for none.",
      +  "maxLength": 160,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / defender / properties / detachment
      Added value: +{
      +  "description": "Detachment id, slug, or name from list_units, to field its rules and offer its stratagems; omit it for none.",
      +  "maxLength": 160,
      +  "minLength": 1,
      +  "type": "string"
      +}
  8. Changed2 schema fields changed
    • changedInput schema / properties / attacker / properties / attached / description
      Previous value: -"Leaders or support units joined to the unit, from its canBeLedBy and canBeSupportedBy."New value: +"Leaders or support units joined to the unit, from its canBeLedBy and canBeSupportedBy. A unit that joins one of these instead, such as Nork Deddog joining a Cadian Command Squad, goes after it."
    • changedInput schema / properties / defender / properties / attached / description
      Previous value: -"Leaders or support units joined to the unit, from its canBeLedBy and canBeSupportedBy."New value: +"Leaders or support units joined to the unit, from its canBeLedBy and canBeSupportedBy. A unit that joins one of these instead, such as Nork Deddog joining a Cadian Command Squad, goes after it."
  9. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses defaults (full strength, default loadout, passive datasheet rules on, stratagems off), edge behavior ('a phase it cannot estimate has status refused with its reasons', notCalculated listed), and the error surface ('Errors are reserved for unknown factions or units, illegal unit sizes...'). It also clarifies the counterintuitive interaction that modifiers never select rules, which an agent could not infer otherwise.

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?

Front-loaded: the first sentence states purpose and returns before any conditional detail, and nearly every sentence carries operational information (defaults, refusal behavior, error scope). It is nonetheless a dense single paragraph of long compound sentences, and some clauses could be split for faster scanning.

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?

For a 6-parameter nested mutation-free simulation tool with no output schema, the description enumerates the returned fields and explains default/refusal behavior, so an agent knows both what it gets and how to react to gaps. Nothing essential for a correct first call appears missing.

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?

Adds real meaning past the schema: rules 0/n semantics, the charged/heavy vs rule-choice distinction, that an omitted weaponModes entry defaults to best-against-defender, and the conditions under which detachment/enhancement/nearby auras take effect. Only the analytics params (llm_model, conversation_id) are left to the schema, which documents them anyway.

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?

Opens with a specific verb and resource — 'Runs Praetorium's exact combat simulator for one attacking unit ... against one defending unit' — and enumerates the three phases plus the exact return fields. An agent can tell this apart from roster/matchup siblings (get_mission_matchup, grade_roster) because the unit-vs-unit simulation and its outputs are spelled out.

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 concrete when-to-use guidance: how to populate a unit from get_my_roster ('pass its pick's entryId as unit with the pick's models, choices and spreads'), when rules should be turned on, and when to explain gaps 'rather than retrying'. It does not name an alternative tool for a different task (e.g. list-wide matchups), so it stops short of full alternative routing.

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