ApiIndex#
- class ansys.fluent.mcp.solve.catalog.index.ApiIndex(*, custom_path: str | None = None, sessions: Iterable[str] = ('solver_session',), help_map: dict[str, str] | None = None)#
Lightweight searchable index over PyFluent’s
api_objects.json.Thread-safe lazy load. Subclass / replace via
custom_pathfor tests.
Overview#
Return the exact lookup. |
|
Return immediate children of |
|
Token-overlap scoring against the API path tokens. |
Return whether the catalog index is available. |
Import detail#
from ansys.fluent.mcp.solve.catalog.index import ApiIndex
Property detail#
Method detail#
- ApiIndex.lookup(path: str) ApiEntry | None#
Return the exact lookup.
pathis the dotted path without the session prefix and without["instance keys."] - Parameters:
- path
str Fluent object path or file-system path to inspect.
- path
- Returns:
Optional[ApiEntry]Result produced by the function.
- ApiIndex.children_of(path: str, *, max_results: int = 50) list[ApiEntry]#
Return immediate children of
path.This refers to entries whose path begins with
path.and has no further dots.
- ApiIndex.search(query: str, *, top_k: int = 10, kinds: Iterable[str] | None = None, under: str | None = None) list[ApiSearchHit]#
Token-overlap scoring against the API path tokens.
- Parameters:
- query
User question or property hint (e.g.
"temperature inlet").- top_k
Maximum number of hits to return.
- kinds
Optional set of kinds to keep (
"Parameter","Command"…).- under
Optional path prefix; restricts the search to entries below it.
- Returns:
list[ApiSearchHit]Collection containing the operation results.