set_python_path
Specify the Python path to ensure the project is correctly identified before running tests, enabling accurate file operations and management.
Instructions
Set it before running tests so the project is correctly recognized
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Implementation Reference
- src/text_editor/server.py:1117-1123 (handler)The handler function decorated with @self.mcp.tool() implements the 'set_python_path' tool. It sets the PYTHONPATH environment variable using the provided path argument.@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
- src/text_editor/server.py:1117-1117 (registration)The @self.mcp.tool() decorator registers the set_python_path function as an MCP tool.@self.mcp.tool()