Skip to main content
Glama

构建配方树

build_recipe_tree

Recursively expands an item's full crafting chain, lists each layer's ingredients and craft counts, and aggregates base raw materials to answer how an item is made or what materials it needs.

Instructions

递归展开一个物品的完整制作链,列出每一层需要什么、需要做几次,并汇总基础原料。用户问「X 怎么做出来的」「做 X 需要哪些原料」时首选这个工具。结果已经处理了循环配方、标签选择、概率产出,并说明所有不确定的地方。

默认只展示前 3 层结构(更深的分支用「⋯」标出节点数和原料),但基础原料是完整的 —— 未展开的分支也已计算在内。要看某个分支的细节,把 detailDepth 调大,或者直接拿那个物品再调用一次本工具。

Input Schema

NameRequiredDescriptionDefault
itemYes物品 id
kindNoitem
countNo要制作多少个
formatNomarkdown 默认,可读性最好;tsv 是列式输出,实测在深链上比 markdown 省约 28% token,适合结果很大的情况;json 是完整结构化数据但最贵(约 markdown 的 1.7 倍),只在需要程序化处理时用;html 生成一个自包含的可交互网页(完整结构、可搜索)写到磁盘并只返回文件路径,用户想自己翻看/分享结果时用。markdown
maxDepthNo最大展开深度,默认 8。调大能展开更深的链,但节点数会快速增长。
tagChoiceNo指定某个标签选哪个成员,形如 {"forge:ingots/iron": "othermod:iron_ingot"}。
detailDepthNo结构展示到第几层(根节点为第 0 层,默认 2 即展示根、子、孙三层)。调大能看更深的展开,token 随之增长。设为 0 则只给原料汇总。
rawMaterialsNo视为基础原料、不再展开的物品 id 列表。比如把某种矿石当作外购原料。
recipeChoiceNo指定某物品用哪条配方,形如 {"minecraft:iron_ingot": "minecraft:iron_ingot_from_blasting_iron_ore"}。用户对结果不满意时用这个覆盖。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that cyclic recipes, tag selection, and probabilistic outputs are already handled, that uncertainties are flagged, and that only the top 3 levels are rendered by default while raw-material totals remain complete across unexpanded branches. It does not state permissions or cost/latency characteristics, but for a read-only analysis tool those are minor.

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?

Two tight paragraphs: purpose and routing first, behavioral caveats and drill-down second. Nearly every sentence earns its place, though the note about deeper branches being marked with 「⋯」 plus node counts is slightly verbose relative to its value.

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 tool with nested objects and no output schema, the description does cover the essentials: what the output contains, how depth affects it, and that uncertainty is surfaced. Gaps remain around the maxDepth/detailDepth split and how the four format choices change the response, but the format trade-offs are already spelled out in the schema.

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 description coverage is 89%, so the schema already documents item, count, format, detailDepth, tagChoice, recipeChoice, and rawMaterials thoroughly. The description only adds drill-down guidance for detailDepth, and notably never clarifies the relationship between maxDepth (default 8) and detailDepth (default 2) — the one ambiguity in this schema that a description should resolve.

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: recursively expand an item's full crafting chain, list each layer's requirements and craft counts, and aggregate base materials. The user-question framing (「X 怎么做出来的」「做 X 需要哪些原料」) pins down exactly which request maps to this tool, distinguishing it from siblings like get_recipe_details or calculate_production_plan.

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 it is the first choice when a user asks how an item is made or what raw materials it needs, and gives a concrete drill-down workflow (raise detailDepth, or re-invoke on the child item). It never names an alternative tool or states when NOT to use it — e.g. versus calculate_production_plan — so routing against siblings is only partly covered.

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