// Code generated by scripts/generate-mbt-blender-sdk.py — DO NOT EDIT.
// === Execute ===
///|
/// execute_blender_code — execute_blender_code
/// Execute Python code in the connected Blender instance. The code runs in Blender's Python environment with full access to ``bpy``. To return data, assign a JSON-serialisable dict to a variable named ``result``. Deferred completion via ``check_is_finished`` is only supported by the interactive addon server, and is rejected in background mode.
///
pub async fn Client::execute_blender_code(
self : Client,
code : String,
) -> String {
let args : Map[String, Json] = {}
args.set("code", Json::string(code))
self.call_tool("execute_blender_code", args)
}
///|
/// execute_blender_code_for_cli — execute_blender_code_for_cli
/// Execute Python code in a background Blender process. Opens *blend_file* with ``blender --background`` and runs *code*. Assign a dict to ``result`` to return data.
///
pub async fn Client::execute_blender_code_for_cli(
self : Client,
blendFile : String,
code : String,
) -> String {
let args : Map[String, Json] = {}
args.set("blend_file", Json::string(blendFile))
args.set("code", Json::string(code))
self.call_tool("execute_blender_code_for_cli", args)
}
// === Blend File ===
///|
/// get_blendfile_summary_datablocks — get_blendfile_summary_datablocks
/// Return a summary of the blend file: data-block counts, active workspace, and render engine.
///
pub async fn Client::get_blendfile_summary_datablocks(self : Client) -> String {
let args : Map[String, Json] = {}
self.call_tool("get_blendfile_summary_datablocks", args)
}
///|
/// get_blendfile_summary_datablocks_for_cli — get_blendfile_summary_datablocks_for_cli
/// Return a data-block summary by opening *blend_file* in background Blender.
///
pub async fn Client::get_blendfile_summary_datablocks_for_cli(
self : Client,
blendFile : String,
) -> String {
let args : Map[String, Json] = {}
args.set("blend_file", Json::string(blendFile))
self.call_tool("get_blendfile_summary_datablocks_for_cli", args)
}
///|
/// get_blendfile_summary_missing_files — get_blendfile_summary_missing_files
/// Report external file references that are missing from disk (images, libraries, fonts, sounds, movie clips, caches, sequences).
///
pub async fn Client::get_blendfile_summary_missing_files(
self : Client,
) -> String {
let args : Map[String, Json] = {}
self.call_tool("get_blendfile_summary_missing_files", args)
}
///|
/// get_blendfile_summary_missing_files_for_cli — get_blendfile_summary_missing_files_for_cli
/// Report missing file references by opening *blend_file* in background Blender.
///
pub async fn Client::get_blendfile_summary_missing_files_for_cli(
self : Client,
blendFile : String,
) -> String {
let args : Map[String, Json] = {}
args.set("blend_file", Json::string(blendFile))
self.call_tool("get_blendfile_summary_missing_files_for_cli", args)
}
///|
/// get_blendfile_summary_of_linked_libraries — get_blendfile_summary_of_linked_libraries
/// Return a tree of directly and indirectly linked library files.
///
pub async fn Client::get_blendfile_summary_of_linked_libraries(
self : Client,
) -> String {
let args : Map[String, Json] = {}
self.call_tool("get_blendfile_summary_of_linked_libraries", args)
}
///|
/// get_blendfile_summary_of_linked_libraries_for_cli — get_blendfile_summary_of_linked_libraries_for_cli
/// Return linked-library info by opening *blend_file* in background Blender.
///
pub async fn Client::get_blendfile_summary_of_linked_libraries_for_cli(
self : Client,
blendFile : String,
) -> String {
let args : Map[String, Json] = {}
args.set("blend_file", Json::string(blendFile))
self.call_tool("get_blendfile_summary_of_linked_libraries_for_cli", args)
}
///|
/// get_blendfile_summary_path_info — get_blendfile_summary_path_info
/// Simple/fast access to the blend file's path, save status, age, and backups.
///
pub async fn Client::get_blendfile_summary_path_info(self : Client) -> String {
let args : Map[String, Json] = {}
self.call_tool("get_blendfile_summary_path_info", args)
}
///|
/// get_blendfile_summary_path_info_for_cli — get_blendfile_summary_path_info_for_cli
/// Return path info by opening *blend_file* in background Blender.
///
pub async fn Client::get_blendfile_summary_path_info_for_cli(
self : Client,
blendFile : String,
) -> String {
let args : Map[String, Json] = {}
args.set("blend_file", Json::string(blendFile))
self.call_tool("get_blendfile_summary_path_info_for_cli", args)
}
///|
/// get_blendfile_summary_usage_guess — get_blendfile_summary_usage_guess
/// Guess the primary use-cases of the current blend file (scored 0-100 with certainty).
///
pub async fn Client::get_blendfile_summary_usage_guess(self : Client) -> String {
let args : Map[String, Json] = {}
self.call_tool("get_blendfile_summary_usage_guess", args)
}
///|
/// get_blendfile_summary_usage_guess_for_cli — get_blendfile_summary_usage_guess_for_cli
/// Guess use-cases by opening *blend_file* in background Blender.
///
pub async fn Client::get_blendfile_summary_usage_guess_for_cli(
self : Client,
blendFile : String,
) -> String {
let args : Map[String, Json] = {}
args.set("blend_file", Json::string(blendFile))
self.call_tool("get_blendfile_summary_usage_guess_for_cli", args)
}
// === Objects ===
///|
/// get_object_detail_summary — get_object_detail_summary
/// Return a structured summary of the object identified by *name*. Includes type, transforms, parent, children, modifiers, constraints, materials, visibility, data-block name, and collections.
///
pub async fn Client::get_object_detail_summary(
self : Client,
name : String,
) -> String {
let args : Map[String, Json] = {}
args.set("name", Json::string(name))
self.call_tool("get_object_detail_summary", args)
}
///|
/// get_objects_summary — get_objects_summary
/// Return the scene's collection hierarchy and their objects. Each collection lists its objects (name, type, parent, data name, selection, visibility) and nested child collections.
///
pub async fn Client::get_objects_summary(self : Client) -> String {
let args : Map[String, Json] = {}
self.call_tool("get_objects_summary", args)
}
// === API Docs ===
///|
/// get_python_api_docs — get_python_api_docs
/// Return the Blender Python API docs for *identifier*, or list modules matching a trailing-``*`` discovery pattern. *identifier* should be a fully-qualified Python name (e.g. ``bpy.app`` or ``bpy.types.Scene.frame_current``). The trailing-``*`` forms are supported as discovery entry-points: - ``*`` enumerates the top-level modules (``bpy``, ``bmesh``, ``mathutils``, ``gpu``, ...). - ``X.*`` enumerates the direct-child identifiers under the *X* namespace (``bpy.*`` -> ``bpy.app``, ``bpy.context``, ...). Both return a ``namespace`` response even when ``X.rst`` would otherwise resolve to ``exact``; the ``.*`` form lets an agent force the child listing. The response always carries ``kind``, ``found``, and ``identifier``. The remaining keys depend on ``kind``: - ``"exact"`` (``found=True``): ``.rst`` was read. Extra keys: ``content`` (RST text), ``examples``. When the file exceeds 32 KB, ``content`` is replaced with a dot-point summary of the file's top-level definitions (prefixed by a header noting the truncation) and ``examples`` is empty - re-query individual members for their rendered blocks. - ``"namespace"`` (``found=True``): no ``.rst`` but ``..rst`` siblings exist. Extra key: ``submodules`` (list of child identifiers). - ``"definition"`` (``found=True``): *identifier* is defined inside a parent RST (e.g. ``bpy.props.IntProperty`` lives in ``bpy.props.rst``). Extra keys: ``content`` (rendered block), ``examples``. - ``"partial"`` (``found=False``): the parent RST was located but the trailing component isn't defined in it. Extra keys: - ``parent`` the identifier whose RST was loaded. - ``available`` top-level definitions in that RST. - ``submodules`` sibling identifiers ``.`` with their own RSTs, filtered to those whose last component contains every character of the missing tail. For a toctree landing page like ``bpy.types`` ``available`` is empty and ``submodules`` is the near-miss list; for a self-contained module like ``bpy.props`` it's the reverse. - ``"suggestions"`` (``found=False``): no direct match, but *identifier* appears as a component of other files. Extra key: ``suggestions`` (list of full identifiers). - ``"missing"`` (``found=False``): nothing matched. ``examples`` (present on the ``exact`` and ``definition`` kinds) is a list of ``{path, content}`` entries referenced from this documentation.
///
pub async fn Client::get_python_api_docs(
self : Client,
identifier : String,
) -> String {
let args : Map[String, Json] = {}
args.set("identifier", Json::string(identifier))
self.call_tool("get_python_api_docs", args)
}
///|
/// search_api_docs — search_api_docs
///
///
pub async fn Client::search_api_docs(
self : Client,
query : String,
maxResults : Int?,
context : Int?,
index : Int?,
) -> String {
let args : Map[String, Json] = {}
args.set("query", Json::string(query))
match maxResults {
Some(v) => args.set("max_results", Json::number(v.to_double()))
None => ()
}
match context {
Some(v) => args.set("context", Json::number(v.to_double()))
None => ()
}
match index {
Some(v) => args.set("index", Json::number(v.to_double()))
None => ()
}
self.call_tool("search_api_docs", args)
}
// === Screenshot ===
///|
/// get_screenshot_of_area_as_image — get_screenshot_of_area_as_image
/// Take a screenshot of a single Blender area and return it as a PNG image. *area_ui_type* matches the area's ``ui_type``. *size_limit_in_bytes* caps the image size in bytes. Zero (the default) uses the MCP message size limit.
///
pub async fn Client::get_screenshot_of_area_as_image(
self : Client,
areaUiType : String,
sizeLimitInBytes : Int?,
) -> String {
let args : Map[String, Json] = {}
args.set("area_ui_type", Json::string(areaUiType))
match sizeLimitInBytes {
Some(v) => args.set("size_limit_in_bytes", Json::number(v.to_double()))
None => ()
}
self.call_tool("get_screenshot_of_area_as_image", args)
}
///|
/// get_screenshot_of_window_as_image — get_screenshot_of_window_as_image
/// Take a screenshot of the entire Blender window and return it as a PNG image. *size_limit_in_bytes* caps the image size in bytes. Zero (the default) uses the MCP message size limit.
///
pub async fn Client::get_screenshot_of_window_as_image(
self : Client,
sizeLimitInBytes : Int?,
) -> String {
let args : Map[String, Json] = {}
match sizeLimitInBytes {
Some(v) => args.set("size_limit_in_bytes", Json::number(v.to_double()))
None => ()
}
self.call_tool("get_screenshot_of_window_as_image", args)
}
///|
/// get_screenshot_of_window_as_json — get_screenshot_of_window_as_json
/// Return a JSON description of the Blender window layout, areas, active object, and selection.
///
pub async fn Client::get_screenshot_of_window_as_json(self : Client) -> String {
let args : Map[String, Json] = {}
self.call_tool("get_screenshot_of_window_as_json", args)
}
// === Workspace ===
///|
/// jump_to_tab_by_name — jump_to_tab_by_name
/// Switch the active workspace tab to *name*.
///
pub async fn Client::jump_to_tab_by_name(
self : Client,
name : String,
) -> String {
let args : Map[String, Json] = {}
args.set("name", Json::string(name))
self.call_tool("jump_to_tab_by_name", args)
}
///|
/// jump_to_tab_by_space_type — jump_to_tab_by_space_type
/// Switch to a workspace whose main area matches *space_type*. If *allow_edits* is True and no matching workspace exists, a new one is created by duplicating the current workspace.
///
pub async fn Client::jump_to_tab_by_space_type(
self : Client,
spaceType : String,
allowEdits : Bool?,
) -> String {
let args : Map[String, Json] = {}
args.set("space_type", Json::string(spaceType))
match allowEdits {
Some(v) => args.set("allow_edits", Json::boolean(v))
None => ()
}
self.call_tool("jump_to_tab_by_space_type", args)
}
// === Viewport ===
///|
/// jump_to_view3d_object_by_name — jump_to_view3d_object_by_name
/// Move the 3D viewport to focus on an object by *name*. If *allow_edits* is True the object may be un-hidden and its collections enabled to make it visible.
///
pub async fn Client::jump_to_view3d_object_by_name(
self : Client,
name : String,
allowEdits : Bool?,
) -> String {
let args : Map[String, Json] = {}
args.set("name", Json::string(name))
match allowEdits {
Some(v) => args.set("allow_edits", Json::boolean(v))
None => ()
}
self.call_tool("jump_to_view3d_object_by_name", args)
}
///|
/// jump_to_view3d_object_data_by_name — jump_to_view3d_object_data_by_name
/// Move the 3D viewport to the object whose data block matches *name*. If *allow_edits* is True the object may be un-hidden and its collections enabled to make it visible.
///
pub async fn Client::jump_to_view3d_object_data_by_name(
self : Client,
name : String,
allowEdits : Bool?,
) -> String {
let args : Map[String, Json] = {}
args.set("name", Json::string(name))
match allowEdits {
Some(v) => args.set("allow_edits", Json::boolean(v))
None => ()
}
self.call_tool("jump_to_view3d_object_data_by_name", args)
}
// === Render ===
///|
/// render_thumbnail_to_path — render_thumbnail_to_path
/// Render a small, low-quality thumbnail to *output_path* (temporarily overrides settings).
///
pub async fn Client::render_thumbnail_to_path(
self : Client,
outputPath : String,
) -> String {
let args : Map[String, Json] = {}
args.set("output_path", Json::string(outputPath))
self.call_tool("render_thumbnail_to_path", args)
}
///|
/// render_viewport_to_path — render_viewport_to_path
/// Render the current scene to *output_path* using current render settings.
///
pub async fn Client::render_viewport_to_path(
self : Client,
outputPath : String,
) -> String {
let args : Map[String, Json] = {}
args.set("output_path", Json::string(outputPath))
self.call_tool("render_viewport_to_path", args)
}
// === Manual Docs ===
///|
/// search_manual_docs — search_manual_docs
///
///
pub async fn Client::search_manual_docs(
self : Client,
query : String,
maxResults : Int?,
context : Int?,
index : Int?,
) -> String {
let args : Map[String, Json] = {}
args.set("query", Json::string(query))
match maxResults {
Some(v) => args.set("max_results", Json::number(v.to_double()))
None => ()
}
match context {
Some(v) => args.set("context", Json::number(v.to_double()))
None => ()
}
match index {
Some(v) => args.set("index", Json::number(v.to_double()))
None => ()
}
self.call_tool("search_manual_docs", args)
}