Skip to main content
Glama

MCP Python Interpreter

write_python_file

Create or update Python files directly in the working directory. Specify the file path, content, and optional overwrite setting to manage scripts efficiently. Part of the MCP Python Interpreter for streamlined development workflows.

Instructions

Write content to a Python file in the working directory or system-wide if allowed. Args: file_path: Path to the file to write (relative to working directory or absolute if system access is enabled) content: Content to write to the file overwrite: Whether to overwrite the file if it exists (default: False)

Input Schema

NameRequiredDescriptionDefault
contentYes
file_pathYes
overwriteNo

Input Schema (JSON Schema)

{ "properties": { "content": { "title": "Content", "type": "string" }, "file_path": { "title": "File Path", "type": "string" }, "overwrite": { "default": false, "title": "Overwrite", "type": "boolean" } }, "required": [ "file_path", "content" ], "title": "write_python_fileArguments", "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PortPro-Technologies-Inc/mcp-python-interpreter'

If you have feedback or need assistance with the MCP directory API, please join our Discord server