Harden MCP transport preset routing
This commit is contained in:
+2
-14
@@ -57,28 +57,16 @@ def create_server() -> Any:
|
||||
|
||||
@server.tool()
|
||||
def analyze_transport_capacity(
|
||||
transport_preset: TransportPresetKey,
|
||||
roll_diameter_mm: float,
|
||||
core_diameter_mm: float,
|
||||
roll_width_m: float,
|
||||
roll_weight_kg: float,
|
||||
product_length_m: float,
|
||||
transport_preset: TransportPresetKey | None = None,
|
||||
length_m: float | None = None,
|
||||
width_m: float | None = None,
|
||||
height_m: float | None = None,
|
||||
max_weight_kg: float | None = None,
|
||||
margin_side_m: float | None = None,
|
||||
margin_ceiling_m: float | None = None,
|
||||
) -> dict[str, Any]:
|
||||
"""Analyze transport capacity for calculated rolls. For a chained request, first call get_article and calculate_roll_diameter, then pass every field from its transport_roll_inputs bundle unchanged: roll_diameter_mm, core_diameter_mm, roll_width_m, roll_weight_kg, and product_length_m. Do not choose among minimum, average, or maximum diameter; the bundle contains the browser-equivalent nominal transport diameter. product_length_m is used for reported m², not placement geometry. transport_preset must be one of the listed canonical identifiers: lkw_sattelzug means LKW Sattelzug / semi-trailer and lkw_tandem means LKW Tandem. Alternatively, supply all custom transport dimensions in m and max_weight_kg. This stateless tool does not recalculate a roll; roll_weight_kg is consumed exactly as supplied."""
|
||||
"""Use this tool when the user asks how many rolls fit on a known RollCalc transport type. A named transport type is already fully defined by its RollCalc preset: do not ask the user for vehicle dimensions or payload, and do not estimate or invent vehicle data. Use these canonical mappings: LKW-Sattelzug -> lkw_sattelzug; LKW-Tandem -> lkw_tandem; 20ft Container -> container_20ft; 40ft Container -> container_40ft; 40ft High Cube -> container_40ft_hc. If the user asks how many rolls fit on an LKW-Sattelzug, call this tool with transport_preset=\"lkw_sattelzug\". For a chained request, first call get_article and calculate_roll_diameter, then pass every field from its transport_roll_inputs bundle unchanged: roll_diameter_mm, core_diameter_mm, roll_width_m, roll_weight_kg, and product_length_m. Do not choose among minimum, average, or maximum diameter; the bundle contains the browser-equivalent nominal transport diameter. product_length_m is used for reported m², not placement geometry. This stateless tool does not recalculate a roll; roll_weight_kg is consumed exactly as supplied."""
|
||||
return analyze_transport_capacity_result(
|
||||
transport_preset=transport_preset,
|
||||
length_m=length_m,
|
||||
width_m=width_m,
|
||||
height_m=height_m,
|
||||
max_weight_kg=max_weight_kg,
|
||||
margin_side_m=margin_side_m,
|
||||
margin_ceiling_m=margin_ceiling_m,
|
||||
roll_diameter_mm=roll_diameter_mm,
|
||||
core_diameter_mm=core_diameter_mm,
|
||||
roll_width_m=roll_width_m,
|
||||
|
||||
Reference in New Issue
Block a user