Cheapest Minecraft anvil combine order and exact XP cost for Java and Bedrock Edition.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Simulates exactly one Minecraft anvil operation — combining `item` (the base, left slot) with `sacrifice` (the right slot), optionally renaming the result — with no search or planning: it's a direct simulation of that specific in-game anvil use, not a 'find the cheapest way to reach X' query. Returns the XP-level cost, feasibility, and the resulting enchantments. A sacrifice enchantment the base item cannot take (e.g. Efficiency from a book onto a sword) is ignored by the anvil: cost 0, `transferred: false`. For finding the cheapest multi-step path from a current state to a target enchantment set, use anvil_migration_path instead.
Minecraft edition; defaults to 'java'
Desired custom name for the result. A rename is included only if this differs from item.name (use '' to clear an existing name) — cost is a flat +1 XP level, the actual text has no effect on cost. Omit to leave the name untouched.
Game version, e.g. '1.21.4'; defaults to the latest supported version for the chosen edition
This tool isn't marked read-only, so it may change something on the server or in an account you connected.
Pick your client. Values in capitals, like YOUR_TOKEN, are yours to fill in.
Run in a terminal
claude mcp add --transport http anvilcalc https://mcp.anvilcalc.com/mcp
Simulates exactly one Minecraft anvil operation — combining `item` (the base, left slot) with `sacrifice` (the right slot), optionally renaming the result — with no search or planning: it's a direct simulation of that specific in-game anvil use, not a 'find the cheapest way to reach X' query. Returns the XP-level cost, feasibility, and the resulting enchantments. A sacrifice enchantment the base item cannot take (e.g. Efficiency from a book onto a sword) is ignored by the anvil: cost 0, `transferred: false`. For finding the cheapest multi-step path from a current state to a target enchantment set, use anvil_migration_path instead.
| Argument | Type | Description |
|---|---|---|
| item* | object | |
| edition | string | Minecraft edition; defaults to 'java' |
| newName | string | Desired custom name for the result. A rename is included only if this differs from item.name (use '' to clear an existing name) — cost is a flat +1 XP level, the actual text has no effect on cost. Omit to leave the name untouched. |
| version | string | Game version, e.g. '1.21.4'; defaults to the latest supported version for the chosen edition |
| sacrifice* | object |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"item",
"sacrifice"
],
"properties": {
"item": {
"type": "object",
"required": [
"id",
"enchantments"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Item id, e.g. 'diamond_sword', or 'book'/'enchanted_book' for a book"
},
"name": {
"type": "string",
"description": "This item's existing custom name, if any"
},
"material": {
"type": "string",
"description": "Optional material override for the item, if applicable"
},
"enchantments": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"level"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Enchantment id, e.g. 'sharpness'"
},
"level": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1,
"description": "Enchantment level (Roman-numeral level as an integer)"
}
}
},
"description": "Enchantments currently on this item/book"
},
"priorWorkCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "This item's own 'too expensive' prior-work counter, if it has already been anvil-combined before (0 if fresh)"
}
}
},
"edition": {
"enum": [
"java",
"bedrock"
],
"type": "string",
"description": "Minecraft edition; defaults to 'java'"
},
"newName": {
"type": "string",
"description": "Desired custom name for the result. A rename is included only if this differs from item.name (use '' to clear an existing name) — cost is a flat +1 XP level, the actual text has no effect on cost. Omit to leave the name untouched."
},
"version": {
"type": "string",
"description": "Game version, e.g. '1.21.4'; defaults to the latest supported version for the chosen edition"
},
"sacrifice": {
"type": "object",
"required": [
"id",
"enchantments"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Item id, e.g. 'diamond_sword', or 'book'/'enchanted_book' for a book"
},
"name": {
"type": "string",
"description": "This item's existing custom name, if any"
},
"material": {
"type": "string",
"description": "Optional material override for the item, if applicable"
},
"enchantments": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"level"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Enchantment id, e.g. 'sharpness'"
},
"level": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1,
"description": "Enchantment level (Roman-numeral level as an integer)"
}
}
},
"description": "Enchantments currently on this item/book"
},
"priorWorkCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "This item's own 'too expensive' prior-work counter, if it has already been anvil-combined before (0 if fresh)"
}
}
}
}
}Compute the cheapest Minecraft anvil combine path to migrate an item's existing enchantments (and prior-work penalty count) to a target enchantment set. sourceItem and targetItem must be the same item id (e.g. both 'diamond_sword') — a mismatch is a tool error, not a silent conversion. Inventory usage is set by two optional inputs: with no availableSources the inventory is not used ("Don't use": every needed book/item is assumed obtainable); with availableSources the plan may use them when they help and assumes the rest is obtainable ("May use"); with inventoryOnly: true, which is never implied, only the listed items are considered, lower levels may be combined into higher ones (two same-level books into the next level) but no outside book is ever assumed ("Only use"; a plan the inventory cannot complete comes back as error 'blocked_plan'). Optional `objective`: 'min_xp' (default, fewest XP levels) or 'min_prior_work' (fewest anvil operations on the finished item so it stays cheap to upgrade later, then fewest XP levels); when set, the response also reports the objective used, the total XP and the result's prior-work count. Returns ordered combine steps, per-step and total cost, feasibility, and a plain-language summary. Fails clearly, as a tool error, if the target requires downgrading an enchantment level (not possible on a vanilla anvil).
| Argument | Type | Description |
|---|---|---|
| edition | string | Minecraft edition; defaults to 'java' |
| version | string | Game version, e.g. '1.21.4'; defaults to the latest supported version for the chosen edition |
| objective | string | What to optimise. 'min_xp' (default) finds the plan with the fewest total XP levels. 'min_prior_work' finds the plan whose FINISHED item has the lowest prior-work count (fewest anvil operations on it, so it stays cheap to upgrade again later — each extra operation doubles the prior-work penalty of any future combine), and among plans with that count picks the cheapest in XP. 'min_prior_work' may cost more XP; when this parameter is given the response also reports the objective used, the total XP and the result's prior-work count so the two modes can be compared. Omit for the original min_xp behaviour and response. |
We read every tool's name, description and inputs the way the model will, looking for instructions hidden from you. A clean result means no warning signs, not a guarantee. Scanned Nov 5, 2026.
No readOnlyHint / destructiveHint annotations, so clients can't tell a read from a write without asking.
Fix: Add annotations to each tool, e.g. { readOnlyHint: true } for tools that only read.
| sourceItem* | object |
| targetItem* | object |
| inventoryOnly | boolean | "Only use": only if you set this to true (it is never implied, not even when availableSources is non-empty). The plan then considers only the items in availableSources (respecting each one's quantity/unlimited) and never assumes an outside book is obtainable. It may still start by combining lower levels into higher ones, for example two same-level books into the next level. If the inventory cannot reach the target, the result is feasible: false with error 'blocked_plan' (the cheapest plan assuming each missing book, with blockers). Omit it or pass false for the default ("Don't use" with no sources, "May use" with sources). |
| availableSources | array | The books/items the player already owns, i.e. the inventory. Omit it or pass [] for "Don't use": no inventory is provided, so the plan assumes every needed book/item is obtainable (a fresh single-enchantment book for each target enchantment). Pass one or more sources for "May use": the plan picks those that make it cheaper, ignores the ones that don't help, and still assumes anything the sources cannot provide is obtainable. Passing sources never implies "Only use"; that needs inventoryOnly: true. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"sourceItem",
"targetItem"
],
"properties": {
"edition": {
"enum": [
"java",
"bedrock"
],
"type": "string",
"description": "Minecraft edition; defaults to 'java'"
},
"version": {
"type": "string",
"description": "Game version, e.g. '1.21.4'; defaults to the latest supported version for the chosen edition"
},
"objective": {
"enum": [
"min_xp",
"min_prior_work"
],
"type": "string",
"description": "What to optimise. 'min_xp' (default) finds the plan with the fewest total XP levels. 'min_prior_work' finds the plan whose FINISHED item has the lowest prior-work count (fewest anvil operations on it, so it stays cheap to upgrade again later — each extra operation doubles the prior-work penalty of any future combine), and among plans with that count picks the cheapest in XP. 'min_prior_work' may cost more XP; when this parameter is given the response also reports the objective used, the total XP and the result's prior-work count so the two modes can be compared. Omit for the original min_xp behaviour and response."
},
"sourceItem": {
"type": "object",
"required": [
"id",
"enchantments"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Item id, e.g. 'diamond_sword' — must match targetItem.id"
},
"name": {
"type": "string",
"description": "The item's existing custom name, if any"
},
"material": {
"type": "string",
"description": "Optional material override for the item, if applicable"
},
"enchantments": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"level"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Enchantment id, e.g. 'sharpness'"
},
"level": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1,
"description": "Enchantment level (Roman-numeral level as an integer)"
}
}
},
"description": "Enchantments currently on the item"
},
"priorWorkCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "The item's existing 'too expensive' prior-work-penalty counter, if known"
}
}
},
"targetItem": {
"type": "object",
"required": [
"id",
"enchantments"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Item id, e.g. 'diamond_sword' — must match sourceItem.id, or the tool returns an error"
},
"name": {
"type": "string",
"description": "Desired custom name. A rename is included only if this differs from sourceItem.name (use '' here to clear an existing name) — cost is a flat +1 XP level, the actual text has no effect on cost. Omit to leave the name untouched."
},
"enchantments": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"level"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Enchantment id, e.g. 'sharpness'"
},
"level": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1,
"description": "Enchantment level (Roman-numeral level as an integer)"
}
}
},
"minItems": 1,
"description": "Desired final enchantments"
}
}
},
"inventoryOnly": {
"type": "boolean",
"description": "\"Only use\": only if you set this to true (it is never implied, not even when availableSources is non-empty). The plan then considers only the items in availableSources (respecting each one's quantity/unlimited) and never assumes an outside book is obtainable. It may still start by combining lower levels into higher ones, for example two same-level books into the next level. If the inventory cannot reach the target, the result is feasible: false with error 'blocked_plan' (the cheapest plan assuming each missing book, with blockers). Omit it or pass false for the default (\"Don't use\" with no sources, \"May use\" with sources)."
},
"availableSources": {
"type": "array",
"items": {
"type": "object",
"required": [
"sourceId",
"isBook",
"enchantments",
"priorWorkCount"
],
"properties": {
"cured": {
"type": "boolean",
"description": "Only meaningful when villagerTrade is true: whether that specific villager has been cured, for the discounted emerald price in the plan's emerald-cost estimate. Never affects XP level cost."
},
"isBook": {
"type": "boolean",
"description": "True if this source is an enchanted book rather than an item"
},
"itemId": {
"type": "string",
"description": "Item id this source is, e.g. 'diamond_pickaxe' — required when isBook is false"
},
"origin": {
"enum": [
"enchanting_table",
"villager_trade",
"fishing",
"loot",
"anvil_combined",
"other"
],
"type": "string",
"description": "Informational only — where this source came from"
},
"quantity": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1,
"description": "How many independent physical copies of this exact source are owned (default 1). Ignored when unlimited is true."
},
"sourceId": {
"type": "string",
"minLength": 1,
"description": "Caller-chosen id used to reference this source in the plan output"
},
"unlimited": {
"type": "boolean",
"description": "True if more of this exact source can always be obtained on demand (e.g. a standing villager trade) — treated as reusable without limit instead of a fixed quantity."
},
"enchantments": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"level"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Enchantment id, e.g. 'sharpness'"
},
"level": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1,
"description": "Enchantment level (Roman-numeral level as an integer)"
}
}
},
"minItems": 1,
"description": "Enchantments already present on this source"
},
"villagerTrade": {
"type": "boolean",
"description": "True if this source is a STANDING, repeatable villager trade (not a specific physical copy you already own) — this, not origin, is what makes a source cost emeralds in the plan's emerald-cost estimate. A source you physically own, even one whose origin happens to be tagged 'villager_trade' as a flavor note on how you got it, should leave this false/unset and stays free. Never affects XP level cost."
},
"priorWorkCount": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "This source's own 'too expensive' prior-work counter, if it has already been anvil-combined before (0 for a fresh book/item)"
}
}
},
"description": "The books/items the player already owns, i.e. the inventory. Omit it or pass [] for \"Don't use\": no inventory is provided, so the plan assumes every needed book/item is obtainable (a fresh single-enchantment book for each target enchantment). Pass one or more sources for \"May use\": the plan picks those that make it cheaper, ignores the ones that don't help, and still assumes anything the sources cannot provide is obtainable. Passing sources never implies \"Only use\"; that needs inventoryOnly: true."
}
}
}