cfast-mcp
v0.1.1MCP server for CFAST (Fire and Smoke Transport), built on top of PyCFAST.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_model
Create a new CFAST model with its first compartment and register it. A CFAST model must contain at least one compartment, so creation includes the first one. Add materials, further compartments, wall vents and fires with the add_* tools, then use inspect_model and run_model. Parameters ---------- title : str Title of the simulation. May consist of letters, numbers, and/or symbols and may be up to 50 characters. room_id : str Unique alphanumeric name of the first compartment, reference…
| Parameter | Type | Description |
|---|---|---|
room_depth * | number | |
room_height * | number | |
room_id * | string | |
room_width * | number | |
title * | string | |
exterior_temperature | number | |
interior_temperature | number | |
relative_humidity | number | |
time_simulation | integer |
inspect_model
Return a model summary, and optionally the CFAST input file. Parameters ---------- model_id : str Id of the model to inspect. show_input_file : bool, optional If True, save the model and return the contents of the generated CFAST input (``.in``) file after the summary. Default value: False. Returns ------- str The model summary, optionally followed by the input file.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | |
show_input_file | boolean |
run_model
Run the CFAST simulation for a model and summarize the outputs. Requires the CFAST executable, resolved via the CFAST environment variable or ``cfast`` on the PATH. Results are stored in the registry so get_results can read them without re-running. Parameters ---------- model_id : str Id of the model to run. timeout : int, optional Maximum CFAST run time. Default units: s, default value: 120 s. Returns ------- str A bounded summary of the produced output sets.…
| Parameter | Type | Description |
|---|---|---|
model_id * | string | |
timeout | integer |
get_results
Read stored run results for a model (bounded; never a full dump). Call run_model first. Without a column, returns a small preview (shape, columns, first rows) of the key. With a column, returns min / max / final value and time of max for that column — for example an upper-layer temperature column such as "ULT_1" in the "compartments" output. Parameters ---------- model_id : str Id of the model whose results to read. key : str Output set, one of: compartments, devices, masses, vents, wal…
| Parameter | Type | Description |
|---|---|---|
key * | string | |
model_id * | string | |
column |
get_model_files
List the on-disk files for a model and their directory. Use this to locate the input (``.in``), output (``.csv``) and log files so you can open them yourself. Files appear once the model is saved or run (run_model, or inspect_model with show_input_file=True); before then the directory is empty. Parameters ---------- model_id : str Id of the model whose files to locate. Returns ------- str The working directory and the names of the files belonging to the model.…
| Parameter | Type | Description |
|---|---|---|
model_id * | string |
update_simulation
Update the simulation environment (scenario and ambient conditions). A model has a single simulation environment, set at create_model; this changes only the parameters you provide; any left as None is unchanged. Parameters ---------- model_id : str Id of the model to modify. title : str or None, optional Title of the simulation. May consist of letters, numbers, and/or symbols and may be up to 50 characters. None leaves it unchanged. time_simulation : int or None, optional…
| Parameter | Type | Description |
|---|---|---|
model_id * | string | |
exterior_temperature | ||
interior_temperature | ||
relative_humidity | ||
time_simulation | ||
title |
add_material
Add a material to a model. A compartment can reference this material by id for its ceiling, wall or floor surfaces, or a target. Parameters ---------- model_id : str Id of the model to modify, as returned by create_model. id : str A one-word (no more than 8 characters) unique identifier for the material, used in other inputs to reference it. material : str A descriptive name for the material. conductivity : float Thermal conductivity for the material. Default u…
| Parameter | Type | Description |
|---|---|---|
conductivity * | number | |
density * | number | |
id * | string | |
material * | string | |
model_id * | string | |
specific_heat * | number | |
thickness * | number | |
emissivity | number |
update_material
Update thermophysical properties of an existing material. Selects the material by material_id and changes only the parameters you provide; any left as None is unchanged. The material's id is the selector and is not changed here. Parameters ---------- model_id : str Id of the model to modify. material_id : str Id of the material to update. conductivity : float or None, optional Thermal conductivity for the material. Default units: W/(m·K). None leaves it unchanged.…
| Parameter | Type | Description |
|---|---|---|
material_id * | string | |
model_id * | string | |
conductivity | ||
density | ||
emissivity | ||
specific_heat | ||
thickness |
add_compartment
Add a compartment to a model. Any surface material id given (ceiling, wall, floor) must already exist in the model — add it first with add_material. If the thermophysical properties of a surface are not included, CFAST treats it as adiabatic (no heat transfer). Parameters ---------- model_id : str Id of the model to modify. id : str Unique alphanumeric name of the compartment, referenced later by fires and wall vents. width : float Width of the compartment as mea…
| Parameter | Type | Description |
|---|---|---|
depth * | number | |
height * | number | |
id * | string | |
model_id * | string | |
width * | number | |
ceiling_mat_id | ||
ceiling_thickness | ||
floor_mat_id | ||
floor_thickness | ||
origin_x | number | |
origin_y | number | |
origin_z | number | |
wall_mat_id | ||
wall_thickness |
update_compartment
Update parameters of an existing compartment. Selects the compartment by comp_id and changes only the parameters you provide; any left as None is unchanged. Use this to attach surface materials to the first compartment (created bare by create_model) or to revise any compartment later. Any surface material id given must already exist in the model — add it first with add_material. The compartment's id itself is the selector and is not changed here. Parameters ---------- model_id : str Id of t…
| Parameter | Type | Description |
|---|---|---|
comp_id * | string | |
model_id * | string | |
ceiling_mat_id | ||
ceiling_thickness | ||
depth | ||
floor_mat_id | ||
floor_thickness | ||
height | ||
origin_x | ||
origin_y | ||
origin_z | ||
wall_mat_id | ||
wall_thickness | ||
width |
add_wall_vent
Add a wall vent (door, window or opening) between two compartments. Wall vents connect compartments that physically overlap in elevation, or connect a compartment to the outside. Both compartments must already exist in the model; comp_b may be "OUTSIDE" to vent to the exterior. All specifications of the vent are made relative to the floor of the first compartment. Parameters ---------- model_id : str Id of the model to modify. id : str Unique name of the vent. comp_a : str…
| Parameter | Type | Description |
|---|---|---|
bottom * | number | |
comp_a * | string | |
comp_b * | string | |
face * | string | |
height * | number | |
id * | string | |
model_id * | string | |
width * | number | |
offset | number |
update_wall_vent
Update an existing wall vent. Selects the vent by vent_id and changes only the parameters you provide; any left as None is unchanged. The vent's id is the selector and is not changed here. Parameters ---------- model_id : str Id of the model to modify. vent_id : str Id of the wall vent to update. comp_a : str or None, optional First compartment id; the reference for all vent specifications. To change the connection, provide both comp_a and comp_b. None leaves t…
| Parameter | Type | Description |
|---|---|---|
model_id * | string | |
vent_id * | string | |
bottom | ||
comp_a | ||
comp_b | ||
face | ||
height | ||
offset | ||
width |
add_ceiling_floor_vent
Add a ceiling/floor vent (vertical flow opening) between compartments. Vertical flow vents connect compartments stacked in elevation, or a compartment to the outside (e.g. a hole in a roof). Both compartments must already exist in the model; comp_bottom may be "OUTSIDE". Parameters ---------- model_id : str Id of the model to modify. id : str Unique name of the vent. comp_top : str Top compartment id, where the vent is in the floor. comp_bottom : str Bottom compart…
| Parameter | Type | Description |
|---|---|---|
area * | number | |
comp_bottom * | string | |
comp_top * | string | |
id * | string | |
model_id * | string | |
offsets | ||
shape | string | |
type | string |
update_ceiling_floor_vent
Update an existing ceiling/floor vent. Selects the vent by vent_id and changes only the parameters you provide; any left as None is unchanged. The vent's id is the selector and is not changed here. Parameters ---------- model_id : str Id of the model to modify. vent_id : str Id of the ceiling/floor vent to update. comp_top : str or None, optional Top compartment id, where the vent is in the floor. To change the connection, provide both comp_top and comp_bottom. None leaves…
| Parameter | Type | Description |
|---|---|---|
model_id * | string | |
vent_id * | string | |
area | ||
comp_bottom | ||
comp_top | ||
offsets | ||
shape | ||
type |
add_mechanical_vent
Add a mechanical vent between two compartments. Mechanical ventilation moves air at a user-specified volume flow between two compartments, or between a compartment and the outside. Both compartments must already exist in the model; comp_from or comp_to may be "OUTSIDE". Parameters ---------- model_id : str Id of the model to modify. id : str Unique name of the mechanical ventilation system. comp_from : str Compartment from which the fan flow originates, or "OUTSIDE". c…
| Parameter | Type | Description |
|---|---|---|
comp_from * | string | |
comp_to * | string | |
flow * | number | |
id * | string | |
model_id * | string | |
area | ||
cutoffs | ||
filter_efficiency | number | |
filter_time | number | |
heights | ||
offsets | ||
orientations |
update_mechanical_vent
Update an existing mechanical vent. Selects the vent by vent_id and changes only the parameters you provide; any left as None is unchanged. The vent's id is the selector and is not changed here. Parameters ---------- model_id : str Id of the model to modify. vent_id : str Id of the mechanical vent to update. comp_from : str or None, optional Compartment from which the fan flow originates, or "OUTSIDE". To change the connection, provide both comp_from and comp_to. None…
| Parameter | Type | Description |
|---|---|---|
model_id * | string | |
vent_id * | string | |
area | ||
comp_from | ||
comp_to | ||
cutoffs | ||
filter_efficiency | ||
filter_time | ||
flow | ||
heights | ||
offsets | ||
orientations |
add_fire
Add a fire to a compartment of a model. A fire in CFAST is specified via a time-dependent heat release rate (HRR). The compartment comp_id must already exist in the model. Fire properties are linearly interpolated between specified time points; if the simulation time is longer than the total duration of the fire, the final values are continued until the end of the simulation. Parameters ---------- model_id : str Id of the model to modify. id : str Unique name of the fire instance.…
| Parameter | Type | Description |
|---|---|---|
comp_id * | string | |
data_table * | array | |
fire_id * | string | |
id * | string | |
location * | array | |
model_id * | string | |
carbon | number | |
chlorine | number | |
heat_of_combustion | number | |
hydrogen | number | |
nitrogen | number | |
oxygen | number | |
radiative_fraction | number |
update_fire
Update an existing fire. Selects the fire by its instance id and changes only the parameters you provide; any left as None is unchanged. The fire instance id is the selector and is not changed here. Changing comp_id moves the fire to another compartment, which must already exist. Parameters ---------- model_id : str Id of the model to modify. id : str Id of the fire instance to update. comp_id : str or None, optional Name of the compartment where the fire occurs. None leaves i…
| Parameter | Type | Description |
|---|---|---|
id * | string | |
model_id * | string | |
carbon | ||
chlorine | ||
comp_id | ||
data_table | ||
fire_id | ||
heat_of_combustion | ||
hydrogen | ||
location | ||
nitrogen | ||
oxygen | ||
radiative_fraction |
add_device
Add a device (target or detector) to a compartment of a model. Devices are either targets (PLATE, CYLINDER), which heat up and report temperature, or detectors (HEAT_DETECTOR, SMOKE_DETECTOR, SPRINKLER). The compartment comp_id must already exist. Required fields depend on the type: targets need material_id (already added with add_material) and exactly one of normal or surface_orientation; HEAT_DETECTOR and SPRINKLER need setpoint and rti (SPRINKLER also spray_density). Parameters ---------- model_id : str…
| Parameter | Type | Description |
|---|---|---|
comp_id * | string | |
id * | string | |
location * | array | |
model_id * | string | |
type * | string | |
depth_units | string | |
material_id | ||
normal | ||
obscuration | number | |
rti | ||
setpoint | ||
spray_density | ||
surface_orientation | ||
temperature_depth | number | |
thickness |
update_device
Update an existing device (target or detector). Selects the device by device_id and changes only the parameters you provide; any left as None is unchanged. The device's id is the selector and is not changed here. Parameters ---------- model_id : str Id of the model to modify. device_id : str Id of the device to update. comp_id : str or None, optional Compartment in which the device is located. None leaves it unchanged. location : list[float] or None, optional…
| Parameter | Type | Description |
|---|---|---|
device_id * | string | |
model_id * | string | |
comp_id | ||
depth_units | ||
location | ||
material_id | ||
normal | ||
obscuration | ||
rti | ||
setpoint | ||
spray_density | ||
surface_orientation | ||
temperature_depth | ||
thickness | ||
type |
add_surface_connection
Add a surface connection between compartments. Surface connections transfer heat through solid boundaries between two compartments. Both compartments must already exist in the model. Unlike other components, a surface connection has no id; refer to it by its position (index) when updating. For WALL connections you should add one in each direction (comp_id -> comp_ids and comp_ids -> comp_id). Parameters ---------- model_id : str Id of the model to modify. conn_type : str Type of connectio…
| Parameter | Type | Description |
|---|---|---|
comp_id * | string | |
comp_ids * | string | |
conn_type * | string | |
model_id * | string | |
fraction |
update_surface_connection
Update an existing surface connection. Surface connections have no id, so they are selected by index (their 0-based position in the order they were added). Only the parameters you provide change; any left as None is unchanged. Parameters ---------- model_id : str Id of the model to modify. index : int 0-based position of the surface connection to update. conn_type : str or None, optional Type of connection: WALL or FLOOR. None leaves it unchanged. comp_id : str or None, option…
| Parameter | Type | Description |
|---|---|---|
index * | integer | |
model_id * | string | |
comp_id | ||
comp_ids | ||
conn_type | ||
fraction |