Skip to main content
Glama

plan_factory

Optimize Satisfactory factory layouts by solving linear programs over unlocked recipes, specifying resource sources, exports, and objectives to maximize power or item output.

Instructions

Optimise a factory with an LP over this world's unlocked recipes.

sources says which resource nodes may feed the plan, as a list of selectors -- named regions, radii, grid cells, compass directions, or specific node ids::

["north"]                        everything in the northern half
["region:Northern Forest"]       one named region
["near:0,-2000@900"]             within 900 m of (0, -2000) metres
["node:BP_ResourceNode30_103"]   one exact node (repeatable)
["grid:X3Y4", "grid:X3Y5"]       specific grid cells
["north", "resource:Crude Oil"]  narrow a location to one resource

Omit it and the whole map is in scope. Use search_resource_nodes to discover ids.

Machine counts are whole buildings at a derived clock: a 52.8 machine-equivalent result is reported as 53 machines at 99.6%. That is exact, always a clean ratio, and provably the power-optimal way to run that throughput, so ordinary ratio underclocking is automatic and needs no parameter.

extractor_clocks overclocks the SOURCE NODES only, e.g. [1.0, 1.5, 2.0, 2.5]. That is the usual play: a node set is fixed, so speed is the only way to get more out of it, whereas overclocking production machines mostly burns power. Each machine above 100% needs Power Shards, which nothing here counts.

clocks is only for asking a different question: passing [0.5, 1.0] lets the solver SPREAD throughput over more machines to save power, which is real but not free, so each machine is priced at machine_cost_mw (default 5 MW, just above the 2.58 MW/machine that trade was measured to be worth). Overclock modes are not offered by default because they consume Power Shards, which nothing here counts.

objective: max_mw | max_item | min_raw | min_machines | min_power. Every item is balanced as an EQUALITY, so a byproduct with no consumer makes the plan infeasible rather than silently vanishing.

exports is the whitelist of what may leave, and the single most load-bearing argument here; default is power only, which is often infeasible for crude oil::

exports=["MW"]                        power out, plant must be self-powered
exports=["Plastic", "Rubber"]         items out, NO power export
exports=["MW", "Plastic", "Rubber"]   both -- MW must be listed explicitly

Two things worth reading twice. The power token is MW (mw, power and Power all work too), not the item name of anything. And exports replaces the default rather than extending it: naming an item drops MW, which is deliberate, because exporting MW also forbids drawing from the existing grid. A token matching no item is refused by name rather than solved around.

sloops is a BUDGET, not a switch: it is how many Somersloops you will actually commit, and the solver spends up to that many wherever they buy the most. Default 0 spends none, because only a fixed number exist on the whole map and a plan that quietly assumed them would be unbuildable. Each one costs 4x power for 2x output on its machine, so they are placed one at a time across many machines rather than filling one -- output is linear in sloops and power is quadratic, so spreading wins.

required names recipes (exact name or class id) that must make their item: every other recipe whose main product is that item is excluded. A locked or banned one is refused by name.

logistics_items pins named items into the belt/pipe table however small their flow, as rows ADDED to the limit biggest by volume. Without it, a two-item question can fall off the bottom of a big plan's flow table.

save_as stores the request. Over an existing plan it needs base_rev, the version you read (list_plans name=): edits to different settings since then merge, the same setting changed by someone else is refused as outdated and nothing is saved.

site_at says where the plan will STAND. On its own it makes the plan's water assumption MEASURED rather than assumed: the terrain at that pad is read and the note quotes how much of it is under water, at what level, and how far below the dry ground. It never changes a number the LP produced -- how many extractors a body of water holds is placement geometry no data here carries. With save_as it is also recorded, with yaw and footprint, so later calls can answer "does what stands there match it" (diff_vs_save) and "show me" (show_on_map at='plan:'); a recalled plan that was sited is measured at its own site without being told again. Use site_plan to set or move the siting of an already-stored plan.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
planNorecall a saved plan by name
saveNo
as_ofNopin to one world state: a sav:… token from an earlier answer
limitNomax rows (hard cap 25)
worldNo
clocksNo
sloopsNoSomersloops the plan may spend; 0 spends none
exportsNo
save_asNostore this request under a name
site_atNowith save_as: record where this plan will STAND -- 'x,y[,z]' in metres, 'me', a factory name, 'slab:<n>' or a run id (the footprint's centre)
sourcesNo
base_revNothe plan version you read; needed to save over an existing plan
requiredNorecipes that must make their item; others for it are excluded
suppliedNoitems another plan hands this one, {item: per-minute}
objectiveNomax_mw
allow_sinksNo
for_factoryNofactory label this plan is for
target_itemNo
only_recipesNo
recycle_onceNorecipes that may run but must not feed each other, e.g. ['Recycled']
site_yaw_degNosite orientation: degrees about world Z, positive +X towards +Y
site_footprintNosite footprint 'WxD' in metres; blank = the layout's own square
exclude_recipesNo
export_minimumsNo
logistics_itemsNoitems whose belt/pipe rows to pin, whatever their volume
machine_cost_mwNo
only_free_nodesNo
plan_notes_textNonote stored with save_as
extractor_clocksNo
water_extractorsNohow many Water Extractors your site can actually hold

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields 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"
      +}
    • addedInput schema / properties / base_rev
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "the plan version you read; needed to save over an existing plan",
      +  "title": "Base Rev"
      +}
    • addedInput schema / properties / required
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "recipes that must make their item; others for it are excluded",
      +  "title": "Required"
      +}
    • addedInput schema / properties / site_at
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "with save_as: record where this plan will STAND -- 'x,y[,z]' in metres, 'me', a factory name, 'slab:<n>' or a run id (the footprint's centre)",
      +  "title": "Site At"
      +}
    • addedInput schema / properties / site_footprint
      Added value: +{
      +  "default": "",
      +  "description": "site footprint 'WxD' in metres; blank = the layout's own square",
      +  "title": "Site Footprint",
      +  "type": "string"
      +}
    • addedInput schema / properties / site_yaw_deg
      Added value: +{
      +  "default": 0,
      +  "description": "site orientation: degrees about world Z, positive +X towards +Y",
      +  "title": "Site Yaw Deg",
      +  "type": "number"
      +}
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it explains the LP balances items as equalities (making byproducts infeasible rather than vanishing), reports machine counts as exact clocked ratios, discloses that unknown export tokens are refused by name, describes the base_rev merge/conflict semantics on save, and clarifies that site_at measures water but never alters LP numbers.

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?

The length is largely justified for a 30-argument LP tool, and the purpose is front-loaded before the argument tour. Some asides ('Two things worth reading twice', the quadratic-vs-linear rationale) are informative rather than wasteful, but the block is dense enough that it could be tightened without losing meaning.

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 tool with 30 params, no annotations, and no output schema, the description covers usage, infeasibility behavior, save/merge semantics, and related tools thoroughly. The remaining gap is the handful of unexplained arguments, so it is strong but not fully complete.

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?

Schema description coverage is only 53% across 30 params, and the prose compensates heavily by explaining sources selectors, clocks vs extractor_clocks, exports/MW token, sloops budget, objective, required, logistics_items, save_as/base_rev, and site_at. Still, several parameters (allow_sinks, only_free_nodes, only_recipes, exclude_recipes, export_minimums) receive no prose explanation at all.

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 first sentence states a specific verb and resource ('Optimise a factory with an LP over this world's unlocked recipes'), and the body explicitly distinguishes the tool from siblings like search_resource_nodes (for discovery), list_plans (naming saved plans), site_plan (setting siting), diff_vs_save, and show_on_map. An agent can tell what this does and what it does not do.

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?

Extensive guidance on when to use which argument: extractor_clocks is 'the usual play' vs clocks being 'only for asking a different question', exports replaces rather than extends the default, sloops is a budget not a switch. It also routes to search_resource_nodes for finding ids and site_plan for repositioning. However it never explicitly states when to choose plan_factory over plan_layout/commission_plan.

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