Enabling write mode¶
Write tools ship disabled. A new install sets allowwrite to 0, and the code treats the setting as off
if it has never been saved.
Turn it on¶
- Open Site administration → Plugins → Local plugins → MCP server.
- Tick Allow write tools (
local_mcp/allowwrite). - Save.
While it is off, write tools are not listed in tools/list. If a client calls one anyway, the answer is
"Write tools are disabled by the administrator.", even for a read-only token.
What a write call still needs¶
- A token with the
write(oradmin) scope. - The
local/mcp:writecapability. By default: editing teachers and managers, in contexts where the role is assigned. - The normal Moodle capability for the action, the same one the user interface checks. See the tools reference.
- The tool itself enabled in the Tools section of the settings.
Deletions¶
delete_activity and delete_section default to dryRun: true. A dry run returns the record that would
be removed and changes nothing. The deletion only happens when the call sends dryRun: false and
confirm: true together.