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_mcpserver/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/mcpserver: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.
The tools with the admin scope count as write tools here, including list_policies and get_policy_acceptances, which only read. The exception is search_users, which works with write mode off. get_conversation_messages is a read tool, but its markAsRead: true option needs the write scope and write mode.
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.