Cotlet: test a Custom API endpoint
cotlet_api_testRuns an endpoint script once now with input, writes not sent, and answers its JSON, log, duration and credits (10 on success, none on failure). Test the exact script you will save.
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": {
"script": "<script>",
"site": "<site>"
},
"name": "cotlet_api_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | The app's site, e.g. substack.com: ctx.http reaches it and its subdomains. | |
| input | No | Sample input, as a caller's JSON body. | |
| script | Yes | The Python script: `def run(ctx):` returning the answer (see the guide). | |
| input_schema | No | JSON Schema of the input, an object (type, properties, items, required). | |
| output_schema | No | JSON Schema of the answer (type, properties, items, required). |