set_config_value
Set a specific configuration value by key. WARNING: Should be used in a separate chat from file operations and command execution to prevent security issues. Config keys include: - blockedCommands (array) - defaultShell (string) - allowedDirectories (array of paths) - fileReadLineLimit (number, ma...
This record as markdown: /tools/desktop-commander/set-config-value.md
What set_config_value does on Desktop Commander
AI agents use set_config_value to create or update resources in Desktop Commander, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Desktop Commander environment.
Why set_config_value is rated Medium
This tool modifies system configuration settings that control security boundaries (blocked commands, allowed directories, file operation limits). While not destructive in the sense of permanent data loss, it can reversibly alter security controls. The high severity reflects that misconfiguration by an agent could bypass safety mechanisms (e.g., removing command blocks, expanding allowed directories).
From the tool's definition Tool description states 'Set a specific configuration value by key' and lists modifiable config keys including 'blockedCommands', 'defaultShell', 'allowedDirectories', and 'fileReadLineLimit'.
Attacks that exploit this kind of access
The rule that runs set_config_value safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Desktop Commander, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For set_config_value, this is the rule to start with:
set_config_value stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Desktop Commander, apply this rule, and every set_config_value call is checked against it from then on.
Questions about set_config_value
Set a specific configuration value by key. WARNING: Should be used in a separate chat from file operations and command execution to prevent security issues. Config keys include: - blockedCommands (array) - defaultShell (string) - allowedDirectories (array of paths) - fileReadLineLimit (number, max lines for read_file) - fileWriteLineLimit (number, max lines per write_file call) - telemetryEnabled (boolean) IMPORTANT: Setting allowedDirectories to an empty array ([]) allows full access to the entire file system, regardless of the operating system. ${CMD_PREFIX_DESCRIPTION}. It is categorised as a Write tool in the Desktop Commander MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
Register the Desktop Commander MCP server in PolicyLayer and add a rule for set_config_value: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Desktop Commander. Nothing to install.
set_config_value is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the set_config_value rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for set_config_value. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
set_config_value is provided by the Desktop Commander MCP server (wonderwhy-er/DesktopCommanderMCP). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Desktop Commander, and thousands of servers like it.
This server
Across the catalogue