import_curl
Converts a pasted curl command into a YAML API request definition under .mcp/api/, moving credentials to .env.mcp.local and replacing them with {{VARIABLE}}.
Instructions
Turn a curl command the user pasted into a request in a YAML definition under .mcp/api/ (creates the file, or appends to it). Method, URL, query string, headers and JSON / form body are carried over. Credentials (Authorization, cookies, -u, credential-looking fields) are moved to .env.mcp.local and replaced by {{VARIABLE}}, so the YAML stays safe to commit. Fails if requestId already exists.
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": {
"curl": "<curl>",
"requestId": "<requestId>"
},
"name": "import_curl"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| curl | Yes | The curl command, exactly as the user pasted it. | |
| requestId | Yes | Id for the new request, e.g. get_user. Letters, digits and underscores. | |
| description | No | ||
| workspaceRoot | No | Absolute project path (optional when MCP_WORKSPACE_ROOT is set). | |
| definitionRelativePath | No | YAML to create or append to, under .mcp/api/. | .mcp/api/imported.yaml |