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 at full strength: 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 rule and weapon-mode choices each side can change, datasheet citations, and a simulator link. Passive datasheet rules apply by default; stratagems and conditional rules stay off until 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 or attachments, and unavailable reference data. It uses default loadouts, and a side fields a detachment's rules and offers its stratagems only when its detachment is named; unit sizes and attachments must be legal.

Input Schema

NameRequiredDescriptionDefault
attackerYes
defenderYes
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. 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"
      +}
  3. 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."
  4. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it discloses refusal semantics (a non-computable phase returns status 'refused' with reasons), the notCalculated list for recognised-but-omitted rules, and the precise error surface (unknown factions/units, illegal sizes/attachments, unavailable reference data). It also states the default-loadout assumption up front, which is exactly the hidden default an agent would otherwise misjudge results with.

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

Conciseness5/5

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

Front-loaded with the core verb/resource, then scope, then returns, then defaults and error semantics — a sensible priority order for a tool this complex. The long return enumeration is justified because no output schema exists, and no sentence is filler.

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 4-parameter, deeply nested tool with no output schema, it covers inputs, defaults, refusal/error behavior, and return contents thoroughly. The gap is the unmentioned `modifiers` object, which an agent would only discover by reading the schema, leaving situational-modifier usage under-explained by the prose.

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 50% schema coverage, the description compensates for the important ambiguity: rules and weaponModes keys must come from a previous result, detachment governs which rules/stratagems apply, attached units must be legal and come from canBeLedBy/canBeSupportedBy, and models must be a legal unit size. The notable omission is the entire `modifiers` object — the single largest and most semantically dense parameter — which is never mentioned in the description (only its schema blurb covers it).

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 ('Runs Praetorium's exact combat simulator') plus the exact scope: one attacker with attached leaders versus one defender at full strength, across shooting, melee, and combined sequences. An agent immediately knows this is a deterministic estimate tool, not a battle-action or roster tool, distinguishing it from every sibling.

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?

Explicitly says passive datasheet rules apply by default while stratagems and conditional rules stay off until chosen, and that a side only gets detachment rules/stratagems when a detachment is named. It also gives a strong operating instruction for gaps: 'explain those gaps rather than retrying,' and enumerates what errors are reserved for. Missing only an explicit pointer to which sibling produces the legal inputs (list_units is named in the schema, not the description).

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