Supported APIs#
This page lists the APIs (MCP tools) registered by PyAnsys Geometry-MCP.
Design and session#
Tool |
Description |
|---|---|
|
Report whether the Geometry backend is connected. |
|
Create a design with the specified name. |
|
Inventory the active design, counting objects throughout nested components. |
|
Return the recorded session commands as a reusable PyAnsys Geometry script. |
|
Run PyAnsys Geometry Python code in the persistent session for operations without a dedicated tool. |
|
Run an existing Discovery or SpaceClaim scripting API file. |
|
Import a geometry file or export the active design. |
Selection and querying#
Tool |
Description |
|---|---|
|
List bodies, components, faces, edges, design curves, datum points/planes/lines, or coordinate systems. Body and construction-object listings include component paths and support component scoping and case-insensitive name lookup. |
|
Create an empty selection builder and return its handle. |
|
Find entities matching criteria and add them to a selection builder. |
|
Narrow the entities already held by a selection builder. |
|
Order the selected entities by a numeric property. |
|
Group selected entities by a shared property. |
|
Extend the current selection to related entities. |
|
Create a named selection from a selection builder or specified geometry entities. |
Modeling and repair#
Tool |
Description |
|---|---|
|
Subtract, unite, or intersect two bodies. The target body survives and the tool body is consumed. |
|
Report geometry issues without modifying the design. By default, inspect all bodies. |
|
Repair a selected class of geometry problem. |
Visualization#
Tool |
Description |
|---|---|
|
Open a 3D scene window for the active design. |
|
Capture a screenshot of the active design’s 3D scene. |
|
Read an image file and return its contents as base64-encoded data. |
Recommended workflows#
Diagnose and repair geometry#
Use inspect_geometry when the problem is unknown. If you already know the
problem, call repair_geometry directly. Both tools can be scoped to named
bodies, a named selection, or a selection builder.
Use repair_geometry(operation="logos") to find and remove logos. max_height
(in meters) is required and has no default, because a height that is too large
also removes real features such as bolt heads. If it is omitted, the tool changes
nothing and asks the assistant to get a value from the user. min_height is
optional and uses the backend default when omitted. This operation requires Ansys 25R2 or later (26R1 or later on
Linux) and reports only the backend success flag, not logo counts.
Select entities#
Create a selection builder, add entities with select_entities, and refine
the result with filter_entities. Use order_entities or
group_entities to organize results. Use create_named_selection to save
a reusable selection.
Run other operations#
Use a dedicated MCP tool when one matches the requested operation. Otherwise,
use run_python for PyAnsys Geometry operations or run_iron_python
for an existing Discovery or SpaceClaim script.