Skip to main content
Glama

diff_vs_save

Read-onlyIdempotent

Compares a saved factory plan against the as-built factory, grouping needed recipe, build, and power changes by startup stage so you can see what to fix next.

Instructions

Steps from the factory as built to a plan: UNPAUSE, SETRECIPE, then BUILD, with the power the new machines add.

Re-solves the plan. Machines match by identity (building + recipe; generators by building; extractors by node), never by position; one on another recipe is busy. Water Extractors cannot be identified, so their count is a range. A saved plan's diff is grouped by startup stage (commission_plan's partition): stage=n narrows to one, stage=0 shows the stage overview of an unsaved solve. Power is proven one way only: a machine that produced in its last 300 s had power; one that did not is 'nothing proven running', never 'unpowered'. Read-only, no dismantle action: machines on the plan's ground but not in it are listed for you to judge.

Input Schema

NameRequiredDescriptionDefault
planYesa saved plan's name or pin:N, or the solve: handle plan_factory printed
saveNo
as_ofNopin to one save: the sav:… token an earlier answer printed
limitNo
stageNoone startup stage's delta; 0 for the stage overview
worldNo
biomassNocount hand-fed biomass burners as generation; omitted: the shared setting
factoryNocount only this factory's machines as built; also 'auto', 'world' or 'none'
show_costNoinclude the bill of what is left to build against spendable stock

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed43 schema fields changedv0.3.0
    • removedInput schema / properties / allow_sinks
      Removed value: -{
      -  "default": true,
      -  "title": "Allow Sinks",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / as_of / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / as_of / description
      Previous value: -"pin to one world state: a sav:… token from an earlier answer"New value: +"pin to one save: the sav:… token an earlier answer printed"
    • removedInput schema / properties / as_of / title
      Removed value: -"As Of"
    • addedInput schema / properties / as_of / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / biomass / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / biomass / title
      Removed value: -"Biomass"
    • addedInput schema / properties / biomass / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
    • removedInput schema / properties / clocks
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "items": {
      -        "type": "number"
      -      },
      -      "type": "array"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Clocks"
      -}
    • removedInput schema / properties / exclude_recipes
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Exclude Recipes"
      -}
    • removedInput schema / properties / export_minimums
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "additionalProperties": {
      -        "type": "number"
      -      },
      -      "type": "object"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Export Minimums"
      -}
    • removedInput schema / properties / exports
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Exports"
      -}
    • removedInput schema / properties / extractor_clocks
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "items": {
      -        "type": "number"
      -      },
      -      "type": "array"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Extractor Clocks"
      -}
    • removedInput schema / properties / factory / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / factory / description
      Previous value: -"count this factory as built; also 'auto', 'world' or 'none'"New value: +"count only this factory's machines as built; also 'auto', 'world' or 'none'"
    • removedInput schema / properties / factory / title
      Removed value: -"Factory"
    • addedInput schema / properties / factory / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / limit / description
      Removed value: -"max rows (hard cap 25)"
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • removedInput schema / properties / machine_cost_mw
      Removed value: -{
      -  "default": 5,
      -  "title": "Machine Cost Mw",
      -  "type": "number"
      -}
    • removedInput schema / properties / objective
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "omitted: min_raw_power with export_minimums, else max_mw",
      -  "title": "Objective"
      -}
    • removedInput schema / properties / only_free_nodes
      Removed value: -{
      -  "default": false,
      -  "title": "Only Free Nodes",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / only_recipes
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Only Recipes"
      -}
    • removedInput schema / properties / plan / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / plan / default
      Removed value: -null
    • changedInput schema / properties / plan / description
      Previous value: -"recall a saved plan by name"New value: +"a saved plan's name or pin:N, or the solve: handle plan_factory printed"
    • removedInput schema / properties / plan / title
      Removed value: -"Plan"
    • addedInput schema / properties / plan / type
      Added value: +"string"
    • removedInput schema / properties / save / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / save / title
      Removed value: -"Save"
    • addedInput schema / properties / save / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • addedInput schema / properties / show_cost / description
      Added value: +"include the bill of what is left to build against spendable stock"
    • removedInput schema / properties / show_cost / title
      Removed value: -"Show Cost"
    • removedInput schema / properties / sources
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Sources"
      -}
    • removedInput schema / properties / stage / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / stage / title
      Removed value: -"Stage"
    • addedInput schema / properties / stage / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • removedInput schema / properties / target_item
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Target Item"
      -}
    • removedInput schema / properties / world / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / world / title
      Removed value: -"World"
    • addedInput schema / properties / world / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • addedInput schema / required
      Added value: +[
      +  "plan"
      +]
    • removedInput schema / title
      Removed value: -"diff_vs_saveArguments"
  2. Changed6 schema fields changedv0.2.0
    • addedInput schema / properties / biomass
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "count hand-fed biomass burners as generation; omitted: the shared setting",
      +  "title": "Biomass"
      +}
    • changedInput schema / properties / factory / description
      Previous value: -"only count this factory's machines as already built"New value: +"count this factory as built; also 'auto', 'world' or 'none'"
    • addedInput schema / properties / objective / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / objective / default
      Previous value: -"max_mw"New value: +null
    • addedInput schema / properties / objective / description
      Added value: +"omitted: min_raw_power with export_minimums, else max_mw"
    • removedInput schema / properties / objective / type
      Removed value: -"string"
  3. Changed1 schema field changed
    • addedInput schema / properties / as_of
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "pin to one world state: a sav:… token from an earlier answer",
      +  "title": "As Of"
      +}
  4. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already establish read-only and non-destructive; the description adds genuinely new behavior: identity-based matching by building+recipe, generators by building, extractors by node, 'busy' machines, the water-extractor count range, and the one-directional power proof rule ('nothing proven running', never 'unpowered'). It also discloses that unmatched in-ground machines are listed rather than removed. It stops short of describing the response shape or any limit behavior, so not 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.

Conciseness3/5

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

It is front-loaded with the core transformation and has no filler, but it adopts a compressed, jargon-heavy style ('one on another recipe is busy', 'nothing proven running') that packs several distinct rules into single lines. The density makes it slower to parse than an organized bullet-style breakdown of matching rules, stage semantics, and power rules would be.

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 9-parameter, no-output-schema read-only analysis tool, the description covers the semantically hard parts: matching identity, range-based extractor counts, stage partitioning, the power caveat, and the billing output ('show_cost'). The main gap is that the shape of the return (per-stage deltas, machine lists, bill) is only sketched, and five of the nine parameters receive no narrative treatment.

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?

Schema coverage is 67%, so the description bears partial load. It meaningfully clarifies `plan` (name, pin:N, or solve: handle) and `stage` (one stage vs. stage overview) — semantics the schema only partly carries. But it says nothing about `limit`, `as_of`, `world`, `factory`, or `biomass` beyond what the schema already states, leaving a gap that matches the mid-tier coverage.

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?

The opening line states a concrete transformation: from the factory as built to a plan, expressed as concrete actions (UNPAUSE, SETRECIPE, BUILD) plus the power delta. This clearly separates it from plan-making siblings such as plan_factory, though it does not directly name the sibling it displaces for a given question. Purpose is specific and distinguishable, but the agent must infer the boundary with commission_plan.

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?

It hints at usage through 'stage=n narrows to one, stage=0 shows the stage overview of an unsaved solve' and by noting plan can be a solve: handle printed by plan_factory. However, there is no explicit 'use this when…, use X instead' statement for the many adjacent tools (plan_factory, commission_plan, bom, factory_map). Usage is implied rather than stated.

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