Skip to main content
Glama
laszlopere

mcp-bytesmith

string_escape

Escape text for JSON, HTML, shell, or other source-code or markup contexts by specifying the target convention, returning the escaped result.

Instructions

Escape text for a source-code or markup context (JSON/JS/C/shell/HTML/...).

style picks the convention: json|js|python|c|backslash (backslash escapes), html|xml (entities), unicode_escape (\uXXXX/\xNN), quoted_printable, or mime_word (=?UTF-8?B?...?=). shell yields a paste-safe single-quoted token. For URL %-escaping use encode(scheme='url') instead. An unknown style raises ValueError. Returns {style, result}. Inverse: string_unescape. Example: string_escape('a"b', "json") -> result 'a"b'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to escape.
styleYesEscaping convention: json|js|python|c|backslash (backslash escapes), html|xml (entities), unicode_escape, quoted_printable, mime_word (=?UTF-8?B?...?=), or shell (paste-safe single-quoted token).
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses return value {style, result}, error on unknown style, example output, and shell behavior. Lacks details on edge cases but covers major behaviors.

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

Conciseness5/5

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

Two sentences plus example, front-loaded with main purpose, no redundant text.

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

Completeness5/5

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

Given no output schema, description adequately explains output structure, error handling, and provides example. Covers all crucial aspects for a complex tool with multiple styles.

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

Parameters4/5

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

Schema covers 100% of parameters; description adds value by listing all style options, explaining shell's behavior, and giving a usage example.

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?

Description clearly states verb 'Escape text for a source-code or markup context', names multiple styles, provides example, and distinguishes from sibling encode (URL escaping).

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

Usage Guidelines5/5

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

Explicitly tells when to use encode instead for URL escaping, mentions that unknown style raises ValueError, and references inverse string_unescape.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/laszlopere/mcp-bytesmith'

If you have feedback or need assistance with the MCP directory API, please join our Discord server