Skip to main content
Glama

MagicON RF Design Engines

Solve a PCB stackup

run_stackup_solver
Read-only

Run the impedance-aware stackup constraint solver to find optimal PCB configurations. Use when the user wants ranked material/thickness/copper solutions for a given layer count and frequency. Returns scored and ranked feasible stackups. Each solution's prepreg_thickness_mm is ONE prepreg layer: prepreg_sheets (1-3) x prepreg_sheet_thickness_mm (maker's table). Per-layer numbers do NOT sum to total_thickness_mm — the total uses the pressed thickness, 0.04064 mm thinner per layer. Report both as returned; never 'correct' one to match the other.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topologyNoTransmission line type: microstrip or stripline (default microstrip)
build_typeNoLamination build: 'single' (default) or HDI level hdi1-hdi4. HDI defaults cost_priority to performance.
layer_countYesTotal copper layers (even number, 2-32)
solder_maskNoSolder mask covering the OUTER trace, as {thickness_mm, dk}. Mask raises the effective permittivity around the trace and pulls Z0 down, so the solver returns a NARROWER width for the same target impedance. OMIT IT (the default) and the microstrip is solved BARE — pass it only when the user says the outer traces are mask-covered, or states a mask thickness or mask Dk. Applies to microstrip targets only: a stripline is buried under laminate, not mask. Both members are optional and default to typical green LPI (0.02 mm, Dk 3.5); thickness_mm must be over 0 and at most 0.2, dk over 1 and at most 10. Mask LOSS is not modeled: the insertion-loss score leaves it out, and a masked result says so in diagnostics — tell your user when you cite a masked solve.
constructionNoLamination. OMIT it unless the user named one: an omitted lamination is built foil; naming a core material builds core_outer where it can be (4+ layers, build_type 'single'), whatever the frequency. 'foil' puts prepreg outermost, so an outer microstrip rides on prepreg; 'core_outer' puts a core outermost, so the core material, such as an RF laminate, sits directly under the outer microstrip — the same choice Guided Phase IV offers. 'auto' searches BOTH and ranks them together; send it only when the user asks to compare the two. On 6+ layers, naming a core outside the FR-4 grades (e.g. RO4350B) under core_outer ALSO searches hybrid boards: that core on the two outer cores, an FR-4 grade on the cores between (a hybrid solution names its inner_core_material); the other boards have every core that material. No hybrid with a stripline target. Each solution reports the construction it was built as; name it when you cite that solution.
user_requestNoThe end user's own words that prompted this call, verbatim. Used to verify that the figures you pass were stated by your user rather than inferred. Omit it and the results will be labelled caller-asserted.
cost_priorityNoCost preference: low, balanced, or performance. Default balanced; an HDI build_type OR a frequency at or above 18 GHz defaults to performance instead, because at mm-wave a balanced weighting ranks an FR4-class laminate above every low-loss one. Pass it explicitly to override either default — a stated preference always wins. The priority actually used comes back as costPriority.
frequency_ghzYesOperating frequency in GHz
input_power_wNoRF power in W going into the line, ONLY when the user states one (0-10000; needs line_length_mm). Adds heat_w: the watts the line turns into heat.
max_solutionsNoMax solutions to return, 1-20 (default 5)
impedance_ohmsNoTarget impedance in Ohms (default 50). Single-target convenience — ignored when impedance_targets is given.
line_length_mmNoLength of the line in mm, ONLY when the user states one (0-2000). Each single-ended trace always returns its loss in dB/mm (trace_results[].loss); with a length it also returns line_loss_db for that line.
reflow_processNoAssembly reflow process; enforces a Tg floor on all dielectrics (default lead_free).
copper_weight_ozNoRestrict solutions to this copper weight in oz (0.5, 1, 2, or 3). Omit to let the solver optimize copper weight; an omitted value inherits the latest update_stackup_config copper weight automatically. The value is the FINISHED thickness, with outer-layer plating already included (1 oz = 0.035 mm finished, plated up from 0.5 oz starting foil). A spec written as '0.5 oz base foil + plating, 1.7 mil finished' uses the OTHER convention — pass 1, not 0.5.
impedance_targetsNoUp to 4 impedance targets the stackup must satisfy SIMULTANEOUSLY, each {ohms, topology ('microstrip'|'stripline'), differential (bool), spacing_mm (differential pair gap in mm, default 0.15)}. Use for multi-impedance boards — e.g. 50 ohm RF plus a 100 ohm differential pair. Overrides impedance_ohms/topology.
target_thickness_milsNoBoard thickness in mils (default 62)
allowed_core_materialsNoRestrict core dielectrics to these catalog materials (e.g. RO4350B, MEGTRON6; 'FR4' = the standard FR-4 grades). Pass ONLY materials the user named; omit for the full catalog.
thickness_tolerance_mmNoAllowed deviation from the target thickness in mm. OMIT it and the solver uses 10% of the target thickness. Set it only when the user states a tolerance. The value the solve used comes back as thicknessToleranceMm - cite that one.
allowed_prepreg_materialsNoRestrict prepregs to these catalog materials (e.g. RO4450F, MEGTRON6; 'FR4' = the standard FR-4 grades). Pass ONLY materials the user named; omit for the full catalog.
allowed_inner_core_materialsNoFor a HYBRID board (an RF core on the two outer cores, a cheaper laminate on the cores between them): the catalog materials the inner cores may be. Omitted, they are 'FR4' (the standard FR-4 grades). Pass ONLY what the user named for the inner cores; giving it also asks for hybrids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / input_power_w
      Added value: +{
      +  "description": "RF power in W going into the line, ONLY when the user states one (0-10000; needs line_length_mm). Adds heat_w: the watts the line turns into heat.",
      +  "type": "number"
      +}
    • addedInput schema / properties / line_length_mm
      Added value: +{
      +  "description": "Length of the line in mm, ONLY when the user states one (0-2000). Each single-ended trace always returns its loss in dB/mm (trace_results[].loss); with a length it also returns line_loss_db for that line.",
      +  "type": "number"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / allowed_inner_core_materials
      Added value: +{
      +  "description": "For a HYBRID board (an RF core on the two outer cores, a cheaper laminate on the cores between them): the catalog materials the inner cores may be. Omitted, they are 'FR4' (the standard FR-4 grades). Pass ONLY what the user named for the inner cores; giving it also asks for hybrids.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / construction / description
      Previous value: -"Lamination. OMIT it unless the user named one: an omitted lamination is built foil; naming a core material builds core_outer where it can be (4+ layers, build_type 'single'), whatever the frequency. 'foil' puts prepreg outermost, so an outer microstrip rides on prepreg; 'core_outer' puts a core outermost, so the core material, such as an RF laminate, sits directly under the outer microstrip — the same choice Guided Phase IV offers. 'auto' searches BOTH and ranks them together; send it only when the user asks to compare the two. Core outer makes EVERY core that material (N/2 cores), not only the outer pair. Each solution reports the construction it was built as; name it when you cite that solution."New value: +"Lamination. OMIT it unless the user named one: an omitted lamination is built foil; naming a core material builds core_outer where it can be (4+ layers, build_type 'single'), whatever the frequency. 'foil' puts prepreg outermost, so an outer microstrip rides on prepreg; 'core_outer' puts a core outermost, so the core material, such as an RF laminate, sits directly under the outer microstrip — the same choice Guided Phase IV offers. 'auto' searches BOTH and ranks them together; send it only when the user asks to compare the two. On 6+ layers, naming a core outside the FR-4 grades (e.g. RO4350B) under core_outer ALSO searches hybrid boards: that core on the two outer cores, an FR-4 grade on the cores between (a hybrid solution names its inner_core_material); the other boards have every core that material. No hybrid with a stripline target. Each solution reports the construction it was built as; name it when you cite that solution."
  3. Changed3 schema fields changed
    • changedInput schema / properties / allowed_core_materials / description
      Previous value: -"Restrict core dielectrics to these catalog materials (e.g. RO4350B, MEGTRON6). Pass ONLY materials the user named; omit to search the full catalog."New value: +"Restrict core dielectrics to these catalog materials (e.g. RO4350B, MEGTRON6; 'FR4' = the standard FR-4 grades). Pass ONLY materials the user named; omit for the full catalog."
    • changedInput schema / properties / allowed_prepreg_materials / description
      Previous value: -"Restrict prepregs to these catalog materials (e.g. RO4450F, MEGTRON6). Pass ONLY materials the user named; omit to search the full catalog."New value: +"Restrict prepregs to these catalog materials (e.g. RO4450F, MEGTRON6; 'FR4' = the standard FR-4 grades). Pass ONLY materials the user named; omit for the full catalog."
    • changedInput schema / properties / construction / description
      Previous value: -"Lamination. OMIT it unless the user named one: an omitted lamination is built core_outer wherever core outer can be built (4+ layers, build_type 'single') and foil everywhere else (2 layers, any HDI build). 'foil' puts prepreg outermost, so an outer microstrip rides on prepreg; 'core_outer' puts a core outermost, so the core material, such as an RF laminate, sits directly under the outer microstrip — the same choice Guided Phase IV offers. 'auto' searches BOTH and ranks them together; send it only when the user asks to compare the two. Core outer makes EVERY core that material (N/2 cores), not only the outer pair. Each solution reports the construction it was built as; name it when you cite that solution."New value: +"Lamination. OMIT it unless the user named one: an omitted lamination is built foil; naming a core material builds core_outer where it can be (4+ layers, build_type 'single'), whatever the frequency. 'foil' puts prepreg outermost, so an outer microstrip rides on prepreg; 'core_outer' puts a core outermost, so the core material, such as an RF laminate, sits directly under the outer microstrip — the same choice Guided Phase IV offers. 'auto' searches BOTH and ranks them together; send it only when the user asks to compare the two. Core outer makes EVERY core that material (N/2 cores), not only the outer pair. Each solution reports the construction it was built as; name it when you cite that solution."
  4. Changed1 schema field changed
    • addedInput schema / properties / user_request / maxLength
      Added value: +4000
  5. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true and openWorldHint=false, so the description carries real weight and delivers it: it warns that mask loss is NOT modeled and that a masked result says so in diagnostics, discloses the cost_priority default overrides, and explains the construction/hybrid search behavior. These are non-obvious behavioral traits an agent cannot derive from the annotations.

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?

Front-loads purpose and usage in the first two sentences, then uses the remaining space for the one genuinely confusing output relationship (per-layer vs pressed total) that would otherwise cause downstream misreporting. No filler or restatement of the title.

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?

With no output schema, the description must explain returns, and it covers the highest-risk return semantics (prepreg thickness, pressed total, diagnostics). For a 20-parameter solver it leaves most return fields (loss, heat_w, costPriority) to the schema, which is reasonable but not exhaustive.

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 100%, so the baseline is 3 and the schema already documents every one of the 20 parameters in detail. The description's numeric detail (prepreg_sheets x prepreg_sheet_thickness_mm, pressed thickness offset) describes returned fields rather than adding parameter syntax 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?

States a specific verb+resource ('Run the impedance-aware stackup constraint solver') plus the concrete output the agent gets ('ranked material/thickness/copper solutions'). This is clearly distinguishable from sibling analysis tools like run_thermal_analysis or run_pdn_analysis, which compute different quantities.

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?

Gives an explicit trigger: 'Use when the user wants ranked material/thickness/copper solutions for a given layer count and frequency.' That is clear context for invocation, but it names no exclusions and no alternative sibling (e.g. when to prefer run_glass_weave_analysis or a config update instead).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources