Solve a PCB stackup
run_stackup_solverRun 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
| Name | Required | Description | Default |
|---|---|---|---|
| topology | No | Transmission line type: microstrip or stripline (default microstrip) | |
| build_type | No | Lamination build: 'single' (default) or HDI level hdi1-hdi4. HDI defaults cost_priority to performance. | |
| layer_count | Yes | Total copper layers (even number, 2-32) | |
| solder_mask | No | Solder 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. | |
| construction | No | 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. | |
| user_request | Yes | 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. | |
| cost_priority | No | Cost 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_ghz | Yes | Operating frequency in GHz | |
| input_power_w | No | 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. | |
| max_solutions | No | Max solutions to return, 1-20 (default 5) | |
| impedance_ohms | No | Target impedance in Ohms (default 50). Single-target convenience — ignored when impedance_targets is given. | |
| line_length_mm | No | 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. | |
| reflow_process | No | Assembly reflow process; enforces a Tg floor on all dielectrics (default lead_free). | |
| copper_weight_oz | No | Restrict 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_dielectric | No | 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. | |
| impedance_targets | No | Up 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_mils | No | Board mils; omitted: what the parts ask, else 62 | |
| allowed_core_materials | No | 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'. | |
| thickness_tolerance_mm | No | Allowed 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_materials | No | 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'. | |
| allowed_inner_core_materials | No | 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. |