MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / dispatch

Method dispatch

src/ifcmcp/ifcmcp/core.py:507–512  ·  view source on GitHub ↗
(self, name: str, args: dict[str, Any] | None = None)

Source from the content-addressed store, hash-verified

505 # Generic dispatcher + tool specs for LLMs
506 # ------------------------
507 def dispatch(self, name: str, args: dict[str, Any] | None = None) -> Any:
508 args = args or {}
509 fn = getattr(self, name, None)
510 if not callable(fn):
511 raise IfcSessionError(f"Unknown tool: {name}")
512 return _jsonify(fn(**args))
513
514 def openai_tools(self) -> list[dict[str, Any]]:
515 """Tool schemas in the OpenAI 'Responses API' format (type=function)."""

Callers 1

call_toolFunction · 0.45

Calls 3

IfcSessionErrorClass · 0.85
_jsonifyFunction · 0.85
fnFunction · 0.85

Tested by

no test coverage detected