Skip to main content
Glama

shell-quote

Shell quoting for bash, PowerShell and cmd.exe with a parse-back check — Turns up to 50 literal strings into a safely quoted argument for bash/sh (POSIX single-quote method), PowerShell (single-quoted literal) and cmd.exe, for agents that build a command line from untrusted or free-form text, and parses each result back with a model of that shell's rules to prove it yields the original string. It returns unsupported for strings cmd.exe cannot carry safely (line break

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "values": "<values>"
    },
    "name": "shell-quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
valuesYesLiteral argument values; at most 100000 characters in total.
targetsNoShells to quote for; default all three. Status is unsupported when any requested target cannot carry a value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and does well: it discloses the quoting method per shell (POSIX single-quote, PowerShell single-quoted literal, cmd.exe), the parse-back verification, the 50-string ceiling, and an `unsupported` outcome for cmd.exe-unsafe strings. It falls short on side-effect safety (never says it only computes and executes nothing) and the trailing edge-case sentence is cut off mid-thought.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is front-loaded with the core action, but it is delivered as one long run-on sentence with nested parentheticals enumerating shells, which makes it harder to scan than a short structured form. Several clauses (shell list, 50 limit) duplicate the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description should explain the return shape; it only hints at a status value `unsupported` without describing the per-target result structure (quoted strings, statuses, partial failures). The final sentence is truncated, leaving an advertised edge case unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, and the description mostly restates constraints already in the schema (50 values, default all three targets, unsupported per requested target). It adds only the framing that values are literal (not to be interpreted), which is minor incremental meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a concrete transformation ("turns up to 50 literal strings into a safely quoted argument") scoped to three named shells and adds a verification step. An agent knows immediately that this is a pure quoting/escaping utility, not something that runs commands.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear usage context: "for agents that build a command line from untrusted or free-form text," which tells the agent exactly when this applies. It lacks explicit when-not guidance and never states that no other sibling does this, but the trigger condition is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources