add_api_example
Save a response example on an endpoint (for instance the 402 your handler returns for a declined card). Replaces the example with the same name, so it is safe to repeat.
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": {
"collection_id": "<collection_id>",
"name": "<name>",
"status": "<status>"
},
"name": "add_api_example"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Example response body, any JSON, e.g. {"error": "card_declined"}. | |
| name | Yes | e.g. Card declined. | |
| path | No | Route path as written in the code, e.g. /v1/charges/:id or /v1/charges/{id}. | |
| method | No | HTTP method of the route, e.g. POST. Use with path instead of endpoint_id. | |
| status | Yes | HTTP status code of the response, e.g. 402. | |
| headers | No | Response headers of the example, e.g. [{"name": "Content-Type", "value": "application/json"}]. | |
| endpoint_id | No | Id of the endpoint. Alternative to method + path. | |
| status_text | No | Reason phrase, e.g. Payment Required. | |
| collection_id | Yes | Id from list_api_collections. |