{
  "name": "shell.quote",
  "group": "text",
  "summary": "Quote a value safely for a shell, and report what would have gone wrong unquoted.",
  "description": "Interpolating a value into a command line is the most common way an agent turns a correct plan into the wrong action. Adding one unescaped parser between the model and the shell has been measured to drop task success by 55 to 73 percentage points, and the damage is usually invisible because the command still runs — just not on what was intended. This applies the quoting rules for the named shell and, separately, names every hazard the raw value contained, so the caller learns which construct was dangerous rather than only receiving an escaped string.",
  "keywords": [
    "shell escape",
    "quote argument",
    "bash quoting",
    "shell injection",
    "command line",
    "argv",
    "powershell escape",
    "cmd escape",
    "safe interpolation",
    "word splitting"
  ],
  "endpoint": "https://fluentedi.com/v1/shell/quote",
  "mcp_name": "shell_quote",
  "makes_network_request": false,
  "parameters": {
    "type": "object",
    "properties": {
      "value": {
        "description": "The value to quote. Pass one argument, not a whole command line.",
        "type": "string",
        "maxLength": 100000
      },
      "shell": {
        "description": "Target shell.",
        "type": "string",
        "enum": [
          "sh",
          "bash",
          "cmd",
          "powershell"
        ],
        "default": "sh"
      }
    },
    "required": [
      "value"
    ],
    "additionalProperties": false
  },
  "examples": [
    {
      "description": "A filename containing a space and a quote",
      "url": "https://fluentedi.com/v1/shell/quote?value=my%20file's%20name.txt",
      "args": {
        "value": "my file's name.txt"
      }
    },
    {
      "description": "A value that would execute if unquoted",
      "url": "https://fluentedi.com/v1/shell/quote?value=%24(rm%20-rf%20%2F)",
      "args": {
        "value": "$(rm -rf /)"
      }
    },
    {
      "description": "The same value for PowerShell",
      "url": "https://fluentedi.com/v1/shell/quote?value=it's%20%24HOME&shell=powershell",
      "args": {
        "value": "it's $HOME",
        "shell": "powershell"
      }
    }
  ],
  "suggestion": null
}