MCP Python Interpreter

by yzfly
Verified

run_python_file

Execute Python files directly from a path, specifying environments and passing arguments for script execution. Enables interaction with Python environments via MCP server.

Instructions

Execute a Python file and return the result. Args: file_path: Path to the Python file to execute (relative to working directory or absolute if system access is enabled) environment: Name of the Python environment to use (default if custom path provided, otherwise system) arguments: List of command-line arguments to pass to the script

Input Schema

NameRequiredDescriptionDefault
argumentsNo
environmentNodefault
file_pathYes

Input Schema (JSON Schema)

{ "properties": { "arguments": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Arguments" }, "environment": { "default": "default", "title": "Environment", "type": "string" }, "file_path": { "title": "File Path", "type": "string" } }, "required": [ "file_path" ], "title": "run_python_fileArguments", "type": "object" }

You must be authenticated.

Other Tools from MCP Python Interpreter

Related Tools

ID: asvhgbf6de