set_python_path
Configure Python environment paths to ensure project dependencies and modules are correctly recognized during testing and execution.
Instructions
Set it before running tests so the project is correctly recognized
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": "set_python_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Implementation Reference
- src/text_editor/server.py:1117-1123 (handler)The handler function for the 'set_python_path' tool. It sets the PYTHONPATH environment variable to the provided path using os.environ. Registered via @self.mcp.tool() decorator.
@self.mcp.tool() async def set_python_path(path: str): """ Set it before running tests so the project is correctly recognized """ os.environ["PYTHONPATH"] = path