Skip to main content
Glama

Curl To Code

curl_to_code
Read-onlyIdempotent

Convert a curl command (copied from browser dev tools, API docs or a terminal) into ready-to-run code: Python requests, JavaScript fetch, Node axios, Go net/http, PHP curl, Rust reqwest, HTTPie and PowerShell. Handles quoting ($'…', "…", line continuations), -X / -H / -d / --data-raw / --data-binary / --data-urlencode / --json / -F multipart / -u basic auth / -b cookies / -A / -e / -G / -I / -L / -k / --max-time / -x proxy / --oauth2-bearer and combined short flags. Also returns the parsed request (method, URL, headers, body) and warnings for options that cannot be expressed. Price: $0.002 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/curl-to-code

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": {
      "command": "<command>"
    },
    "name": "curl_to_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandYesThe curl command
targetsNoLanguages to generate ("all" for every target)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description goes well beyond them: it discloses that warnings are emitted for options that cannot be expressed, that the parsed request is returned, and — critically — that each successful call costs $0.002 USDC via x402 on Solana with a documented HTTPS fallback endpoint. That pricing and payment-channel disclosure is exactly the kind of behavior an agent needs before invoking.

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

Conciseness4/5

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

Purpose, targets and supported flags are front-loaded in one dense block with no filler sentences. The long flag enumeration is justified since it defines accepted input, though it could be compressed (e.g. grouped by category) to reduce scanning cost.

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?

There is no output schema, so the description carries the return-value burden and does so: it names the generated languages, the additional parsed request (method, URL, headers, body) and the warning channel. With only two simple parameters and full schema coverage, nothing an agent needs to call this correctly is missing.

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 coverage is 100%, so the baseline would be 3, but the description adds real input semantics by enumerating the curl flags it accepts (-X, -H, -d, --data-urlencode, -F, -u, -b, -G, -I, -L, -k, -x proxy, combined short flags), telling the agent what to put in 'command'. It also expands the target languages by name, though it omits the 'all' sentinel and the default, which the schema covers.

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 opens with a specific verb and resource ('Convert a curl command ... into ready-to-run code') and immediately enumerates the output targets, which makes it unmistakable against the surrounding math/number-theory siblings. Scope is further pinned by naming the input sources (dev tools, API docs, terminal).

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 clearly frames the situation that calls for the tool (you have a curl command, e.g. copied from browser dev tools) and implies there is no alternative in the toolset. It does not state any explicit exclusions or when-not-to-use conditions, which keeps it below a 5.

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