cml_api
Authenticate and execute HTTP requests (GET, POST, PUT, PATCH, DELETE) against the CML2 API. Specify the path after /api/v0 and optional JSON body to interact with CML2 resources.
Instructions
Authenticated CML2 REST call.
Args: method: HTTP method (GET/POST/PUT/PATCH/DELETE). path: Path AFTER /api/v0, must start with '/'. Example: '/labs'. body: Optional JSON-serializable value (object/array/string/etc.). Sent as the request body with Content-Type: application/json.
Returns the raw response body as text (callers should json.parse if needed). Re-authenticates and retries once on HTTP 401. Raises on non-2xx.
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": {
"method": "<method>",
"path": "<path>"
},
"name": "cml_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | ||
| path | Yes | ||
| body | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |