Skip to content
BEAD

Comment Style Converter

Translate //, #, --, ;, %, /* */, and <!-- --> comments between languages while preserving indentation.

Converted
</>Use this tool programmaticallycurl · JavaScript · MCP

Same tool, callable from any HTTP client or from Claude (via MCP). Anonymous: 100 req/day per IP. Sign up for 1,000 req/day.

curl
curl https://api.b-e-a-d.com/tools/comment-style-converter/run \
  -H "Content-Type: application/json" \
  -d '{
  "source": "a",
  "from": "slash-slash",
  "stripOnly": false
}'
JavaScript (fetch)
const res = await fetch("https://api.b-e-a-d.com/tools/comment-style-converter/run", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "source": "a",
  "from": "slash-slash",
  "stripOnly": false
}),
});
const data = await res.json();
console.log(data.result);
MCP (Claude Desktop / Claude Code)
# In Claude Desktop / Claude Code, add to your MCP config:
{
  "mcpServers": {
    "bead": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.b-e-a-d.com"]
    }
  }
}

# Then ask Claude to call:
mcp__bead__bead_comment_style_converter

Full reference: developer docs · OpenAPI spec

Why

Porting code or documentation between languages often leaves a trail of orphaned // in Python or # in JavaScript. This tool strips the source comment prefix and re-wraps the lines in the target style — preserving indentation and blank lines.

Supported styles

  • Line: //, #, --, ;, %
  • Block: /* … */, <!-- … -->, {- … -}, (* … *)

You might also like