Skip to main content
Glama

Convert a curl command to code

convert_curl
Read-onlyIdempotent

Parse a curl command and generate equivalent JavaScript fetch, Python requests, Go, PHP, or Rust 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": "convert_curl"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetNofetch
commandYes

Output Schema

NameRequiredDescriptionDefault
urlYes
bodyNo
methodYes
headersYes
snippetYes
warningsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

B3.4/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false, so the safety profile is covered. The description adds only that the input is parsed, hinting at possible rejection of malformed commands, but says nothing about error behavior, size limits, or whether all curl features (auth, proxies, multipart) are supported.

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?

A single front-loaded sentence with zero filler; the action and the output options are stated in order of importance.

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?

An output schema exists, so return values need no explanation, and the annotations cover safety. For a low-complexity two-parameter tool it is nearly adequate, but it omits how unsupported or malformed curl syntax is handled and what the command input must look like.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must carry the load. It enumerates the five target languages with helpful labels ('JavaScript fetch', 'Python requests'), which is slightly richer than the raw enum, but the required 'command' parameter's format and 20,000-character limit are never mentioned.

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?

States a specific verb pair (parse, generate) and a specific resource (curl command), plus the exact output languages. No sibling in the list does curl-to-code conversion, so an agent can identify it immediately from the name and description alone.

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

Usage Guidelines3/5

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

Usage is only implied: an agent must infer that it should call this when it holds a curl command and wants equivalent code. There is no explicit when-to-use, when-not-to-use, or named alternative, and no note on what to do with commands containing unsupported flags.

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.