The domain_tools.py module#

Summary#

get_solve_domain_tools

Return the canonical solve-leaf domain-tool catalog.

Description#

Solve-leaf domain tools (canonical catalog).

A domain tool is a stateless backend/catalog operation that has no dependency on a plan builder, journal, learned constraints, or recipe registry. (Those belong to the higher-level agent product that consumes this leaf over MCP, not here.)

Each entry is a typed async function plus a name/description:

DomainTool(
    spec=DomainToolSpec(name="mesh_quality", description="..."),
    handler=mesh_quality_impl,
)

The handler signature looks like this:

async def <name>_impl(
    backend: Backend,
    *,
    arg1: T1,
    arg2: T2 | None = None,
) -> dict[str, Any]: ...

FluidsLeafMCP._register_one_domain_tool() synthesizes a wrapper whose inspect.Signature mirrors the handler minus the leading backend parameter so that FastMCP can extract the JSON input schema from the wrapper.

To add a tool, write a typed _impl coroutine in ansys.fluent.mcp.solve.lib..py and append a DomainTool entry to get_solve_domain_tools(). No leaf-side changes are needed. SolveMCP._register_tools already registers everything this function returns.

Module detail#

domain_tools.get_solve_domain_tools() list[ansys.fluent.mcp.common.domain_tools.DomainTool]#

Return the canonical solve-leaf domain-tool catalog.

The FluidsLeafMCP._register_domain_tools() helper consumes this list and binds each entry to self.tool with a signature-preserving wrapper.

Returns:
list[DomainTool]

Collection containing the operation results.