Skip to main content
Glama

plan_factory

Optimize factory production with linear programming across unlocked recipes, controlling resource sources, exports, machine clocks, and objectives like max power or minimum raw usage.

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.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
planNorecall a saved plan by name
saveNo
limitNomax rows (hard cap 25)
worldNo
clocksNo
sloopsNoSomersloops the plan may spend; 0 spends none
exportsNo
save_asNostore this request under a name
sourcesNo
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']
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
Behavior5/5

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

The description discloses many non-obvious behaviors: machine counts are rounded to whole buildings at a derived clock with exact ratios, 'exports' replaces the default and refuses unknown tokens, 'sloops' is a budget that spends optimally, and equality constraints make byproducts infeasible if unconsumed. These details go far beyond what annotations could provide and fully inform the agent of consequences.

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?

Although long, the description is densely packed with essential information, organized by parameter with inline examples. It is front-loaded with a clear purpose statement and each section earns its place, despite the length. The use of code blocks and examples improves scannability.

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 tool with 24 parameters and no output schema, the description covers the key behavioral and semantic aspects, including defaults, exception cases, and interactions. It explains machine rounding, power trade-offs, and edge cases like exports dropping MW. This makes it effectively complete for agent invocation, even without an output schema.

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

Parameters5/5

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

With schema description coverage at 42%, the description compensates by deeply explaining the most critical parameters: sources, exports, sloops, clocks, extractor_clocks, machine_cost_mw, and logistics_items. For example, it clarifies that 'exports' is a whitelist that replaces the default and that 'sloops' is a budget, not a switch. This adds substantial meaning beyond the schema.

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 description opens with 'Optimise a factory with an LP over this world's unlocked recipes,' which uses a specific verb and resource, clearly stating the tool's function. It distinguishes itself from sibling tools by focusing on optimization over recipes, and even references search_resource_nodes for node discovery. This is a strong, specific purpose statement.

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?

The description provides extensive guidance on when and how to use parameters, such as explaining that 'exports' replaces the default rather than extending it and that 'sloops' is a budget. It also points to search_resource_nodes for discovering node ids. However, it does not explicitly state when to choose this tool over alternatives, so it falls short of a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lukszi/SatisfactoryMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server