load_library
Loads a Python helper file into Inventor's execute_python namespace and keeps it available per project, avoiding repeated function definitions and reporting load time plus slowest lines.
Instructions
Run a Python file into this Inventor's execute_python namespace and keep it there: after reload_api, a new namespace or a new server it is loaded again by itself (remembered per project). For helper functions you would otherwise redefine every time. Says how long it took and which lines were slowest — a COM call at module level is the usual culprit. A file at ~/.inventor-mcp/startup.py (or INVENTOR_MCP_STARTUP) is loaded for every Inventor.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "load_library"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| instance | No | Which connected Inventor to use (list_instances). Leave empty when only one is connected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |