Tools: Write¶
Model creation and editing tools.
add_object(object_type, name='', fields=None)
¶
Add one object. Use batch_add_objects for multiple.
Source code in src/idfkit_mcp/tools/write.py
batch_add_objects(objects)
¶
Add multiple objects in one call. Continues on errors.
Source code in src/idfkit_mcp/tools/write.py
clear_session()
¶
Reset model and simulation state so you can start fresh.
Unloads the current model, schema, simulation results, migration report, and weather file. Uploaded files are kept so the user can re-load them without re-uploading.
WARNING: Only call this when the user explicitly asks to start over. Do NOT call this to recover from tool errors — those errors are recoverable by retrying the failed tool or calling load_model again.
Source code in src/idfkit_mcp/tools/write.py
duplicate_object(object_type, name, new_name)
¶
Copy an object with a new name.
Source code in src/idfkit_mcp/tools/write.py
new_model(version=None)
¶
Create an empty model.
Source code in src/idfkit_mcp/tools/write.py
remove_object(object_type, name, force=False)
¶
Delete an object. Blocked if referenced unless force=True.
Source code in src/idfkit_mcp/tools/write.py
rename_object(object_type, old_name, new_name)
¶
Rename and auto-update all references.
Source code in src/idfkit_mcp/tools/write.py
save_model(file_path=None, output_format='idf', overwrite=False)
¶
Write model to disk as IDF or epJSON.
When file_path is omitted the model is re-saved to its original load
path. An explicit file_path must resolve within an allowed output
directory (IDFKIT_MCP_OUTPUT_DIRS, defaults to CWD) and will not
overwrite an existing file unless overwrite is True.
Source code in src/idfkit_mcp/tools/write.py
update_object(object_type, name, fields)
¶
Update fields on an existing object.