# 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}

Agent View of the PolicyLayer registry record for `set_config_value`. HTML page: https://policylayer.com/tools/desktop-commander/set-config-value

## Facts

- Tool: `set_config_value`
- Server: Desktop Commander (`wonderwhy-er/DesktopCommanderMCP`) — https://policylayer.com/tools/desktop-commander.md
- Homepage: https://github.com/wonderwhy-er/DesktopCommanderMCP
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_config_value",
    "arguments": {}
  }
}
```

## 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 own definition: "Tool description states 'Set a specific configuration value by key' and lists modifiable config keys including 'blockedCommands', 'defaultShell', 'allowedDirectories', and 'fileReadLineLimit'."

## Use case

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.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Desktop Commander:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "set_config_value": {
      "limits": [
        {
          "counter": "set_config_value_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Desktop Commander (10)

- `force_terminate` — Destructive — https://policylayer.com/tools/desktop-commander/force-terminate.md
- `get_config` — Read — https://policylayer.com/tools/desktop-commander/get-config.md
- `get_file_info` — Read — https://policylayer.com/tools/desktop-commander/get-file-info.md
- `get_recent_tool_calls` — Read — https://policylayer.com/tools/desktop-commander/get-recent-tool-calls.md
- `get_usage_stats` — Read — https://policylayer.com/tools/desktop-commander/get-usage-stats.md
- `kill_process` — Read — https://policylayer.com/tools/desktop-commander/kill-process.md
- `list_processes` — Read — https://policylayer.com/tools/desktop-commander/list-processes.md
- `list_searches` — Read — https://policylayer.com/tools/desktop-commander/list-searches.md
- `create_directory` — Write — https://policylayer.com/tools/desktop-commander/create-directory.md
- `move_file` — Write — https://policylayer.com/tools/desktop-commander/move-file.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=desktop-commander · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/desktop-commander
