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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "layer_count": "<layer_count>",
      "frequency_ghz": "<frequency_ghz>",
      "user_request": "<user_request>"
    },
    "name": "run_stackup_solver"
  }
}

Input 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 non-FR-4 core 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. Naming a core outside the FR-4 grades (e.g. RO4350B) under core_outer ALSO searches hybrid boards, which name their inner_core_material: that core on top and FR-4 below (hybrid_layout top_only, 4 layers; widths are for the top layer), or on both outer cores and FR-4 between (6+ layers). No hybrid with a stripline target. Each solution reports the construction it was built as; name it when you cite that solution.
user_requestYesRequired: the end user's own words that prompted this call, verbatim. A figure not in them or in an earlier result is asked of the user (MCP elicitation), or refused.
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.
fixed_dielectricNoOptional: the user's OWN fixed dielectric, to get only the trace width on it (no stackup is designed): {material, thickness_mm (microstrip: trace to plane; stripline: plane to plane), copper_thickness_mm, topology: microstrip|stripline}. Needs impedance_ohms and frequency_ghz; layer_count is not used.
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 mils; omitted: what the parts ask, else 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; none named at all = 'FR4'.
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; none named at all = 'FR4'.
allowed_inner_core_materialsNoFor a HYBRID board (an RF core on top or on both outer cores, a cheaper laminate on the others): the catalog materials those cores may be. Omitted, 'FR4' (the standard FR-4 grades). Pass ONLY what the user named for them; giving it also asks for hybrids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / target_thickness_mils / description
      Previous value: -"Board thickness in mils (default 62)"New value: +"Board mils; omitted: what the parts ask, else 62"
  2. Changed1 schema field changed
    • addedInput schema / properties / fixed_dielectric
      Added value: +{
      +  "description": "Optional: the user's OWN fixed dielectric, to get only the trace width on it (no stackup is designed): {material, thickness_mm (microstrip: trace to plane; stripline: plane to plane), copper_thickness_mm, topology: microstrip|stripline}. Needs impedance_ohms and frequency_ghz; layer_count is not used.",
      +  "type": "object"
      +}
  3. Changed2 schema fields changed
    • changedInput schema / properties / user_request / description
      Previous value: -"The 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."New value: +"Required: the end user's own words that prompted this call, verbatim. A figure not in them or in an earlier result is asked of the user (MCP elicitation), or refused."
    • changedInput schema / required
      Previous value: -[
      -  "layer_count",
      -  "frequency_ghz"
      -]New value: +[
      +  "layer_count",
      +  "frequency_ghz",
      +  "user_request"
      +]
  4. Changed2 schema fields changed
    • changedInput schema / properties / allowed_inner_core_materials / description
      Previous value: -"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."New value: +"For a HYBRID board (an RF core on top or on both outer cores, a cheaper laminate on the others): the catalog materials those cores may be. Omitted, 'FR4' (the standard FR-4 grades). Pass ONLY what the user named for them; giving it also asks for hybrids."
    • changedInput schema / properties / construction / description
      Previous value: -"Lamination. OMIT it unless the user named one: an omitted lamination is built foil; naming a non-FR-4 core 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."New value: +"Lamination. OMIT it unless the user named one: an omitted lamination is built foil; naming a non-FR-4 core 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. Naming a core outside the FR-4 grades (e.g. RO4350B) under core_outer ALSO searches hybrid boards, which name their inner_core_material: that core on top and FR-4 below (hybrid_layout top_only, 4 layers; widths are for the top layer), or on both outer cores and FR-4 between (6+ layers). No hybrid with a stripline target. Each solution reports the construction it was built as; name it when you cite that solution."
  5. Changed3 schema fields changed
    • changedInput schema / properties / allowed_core_materials / description
      Previous 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."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; none named at all = 'FR4'."
    • changedInput schema / properties / allowed_prepreg_materials / description
      Previous 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."New value: +"Restrict prepregs to these catalog materials (e.g. RO4450F, MEGTRON6; 'FR4' = the standard FR-4 grades). Pass ONLY materials the user named; none named at all = 'FR4'."
    • 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. 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."New value: +"Lamination. OMIT it unless the user named one: an omitted lamination is built foil; naming a non-FR-4 core 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."
  6. 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"
      +}
  7. 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."
  8. 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."
  9. Changed1 schema field changed
    • addedInput schema / properties / user_request / maxLength
      Added value: +4000
  10. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish read-only and closed-world behavior, and the description adds meaningful output caveats: results are scored/ranked feasible stackups, prepreg_thickness_mm is a single layer, and total thickness uses pressed thickness 0.04064 mm thinner per layer. It also tells the agent not to reconcile the two numbers, which prevents a real reporting error. It is strong but does not cover solver failure/no-feasible-result behavior or runtime characteristics.

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?

The description is front-loaded with purpose and trigger, then adds only high-value result-interpretation caveats. No sentence is redundant.

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 21-parameter solver with no output schema, the description covers the core purpose, trigger, and the most confusing returned fields. The detailed parameter semantics live in the schema, so remaining gaps are minor; it could still say more about the full result structure or infeasible cases.

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 coverage is 100%, so all 21 parameters are already documented in the schema. The description adds output interpretation rather than input-parameter meaning; it restates layer count and frequency but does not enrich the many input parameters. Baseline 3 is appropriate.

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 names the specific solver and resource ('impedance-aware stackup constraint solver' for 'PCB configurations') and says it returns ranked material/thickness/copper solutions for a given layer count and frequency. That is enough to distinguish it from sibling analysis tools.

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?

It gives a clear triggering condition: use when the user wants ranked material/thickness/copper stackups for a layer count and frequency. It does not name when not to use it or point to an alternative sibling, so it falls short of the explicit when/when-not/alternatives bar.

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