generate_snippet
Generates curl, fetch, and axios code snippets for any API endpoint. Supports optional API key and custom headers.
Instructions
Generates ready-to-use curl, fetch, and axios code snippets for calling a given API endpoint.
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": {
"url": "<url>"
},
"name": "generate_snippet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The API endpoint URL | |
| apiKey | No | Optional API key to include | |
| apiKeyParam | No | Query parameter name for the API key (default: "api_key") | |
| headers | No | Additional headers as key-value pairs |