mcp_script_write
Create, overwrite, or delete files in an agent's scripts folder by supplying content or remove=true, with built-in refusal when the agent uses the default API key or a write.lock is present.
Instructions
Create or overwrite a file in agent's scripts/ folder with content, or delete it with remove=true. name is a bare filename of up to 32 characters (letters, digits, . _ -, no leading dot or dash, no paths). Refused while the agent still has the default api_key, and once a write.lock file is in the folder. Writing write.lock (any content) locks every script write, and this tool can then no longer change or remove it. The lock does not stop runs: a script run with mcp_script_run that deletes files can remove write.lock, as can a shell (Pi) or USB (Pico, ESP32).
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": {
"agent": "<agent>",
"name": "<name>"
},
"name": "mcp_script_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| agent | Yes | ||
| remove | No | ||
| content | No |