Python API Docs
This section is for users importing tigl-mcp as a Python package. It focuses on the importable module surface and callable entrypoints.
Top-level package
Model Context Protocol server for TiGL/CPACS geometry.
- exception tigl_mcp.MCPError(error_type, message, details=None)[source]
Structured MCP error containing a JSON-friendly payload.
Create a structured MCP error payload.
- class tigl_mcp.SessionManager[source]
In-memory manager mapping session identifiers to handles.
Initialize the session manager with empty state.
- class tigl_mcp.ToolDefinition(name, description, parameters_model, handler, output_schema=None)[source]
Description of a tool that can be registered with the server.
- name
Unique name of the tool.
- Type:
str
- description
Human-readable description of the tool purpose.
- Type:
str
- parameters_model
Pydantic model used to validate input parameters.
- Type:
- handler
Callable that executes the tool logic.
- Type:
collections.abc.Callable[[dict[str, Any]], dict[str, Any]]
- class tigl_mcp.ToolParameters[source]
Base parameters schema for MCP tools.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
CLI entrypoint
Entry point for the TiGL MCP FastMCP server.