Update an eval case
Partial update — omitted fields are left as they are. Supplying steps REPLACES the case’s definition rather than merging into it. matchOptions and checks accept null to clear the case-level override and fall back to the suite’s.
curl --request PATCH \
--url https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"steps": [
{
"id": "<string>",
"prompt": "<string>",
"serverName": "<string>",
"toolName": "<string>",
"arguments": {},
"action": {},
"assertion": {}
}
],
"expectedOutput": "<string>",
"iterations": 5,
"isNegative": true,
"scenario": "<string>",
"models": [
{
"model": "<string>",
"provider": "<string>"
}
],
"matchOptions": {},
"checks": {
"list": [
{}
]
}
}
'import requests
url = "https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId}"
payload = {
"title": "<string>",
"steps": [
{
"id": "<string>",
"prompt": "<string>",
"serverName": "<string>",
"toolName": "<string>",
"arguments": {},
"action": {},
"assertion": {}
}
],
"expectedOutput": "<string>",
"iterations": 5,
"isNegative": True,
"scenario": "<string>",
"models": [
{
"model": "<string>",
"provider": "<string>"
}
],
"matchOptions": {},
"checks": { "list": [{}] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
steps: [
{
id: '<string>',
prompt: '<string>',
serverName: '<string>',
toolName: '<string>',
arguments: {},
action: {},
assertion: {}
}
],
expectedOutput: '<string>',
iterations: 5,
isNegative: true,
scenario: '<string>',
models: [{model: '<string>', provider: '<string>'}],
matchOptions: {},
checks: {list: [{}]}
})
};
fetch('https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'steps' => [
[
'id' => '<string>',
'prompt' => '<string>',
'serverName' => '<string>',
'toolName' => '<string>',
'arguments' => [
],
'action' => [
],
'assertion' => [
]
]
],
'expectedOutput' => '<string>',
'iterations' => 5,
'isNegative' => true,
'scenario' => '<string>',
'models' => [
[
'model' => '<string>',
'provider' => '<string>'
]
],
'matchOptions' => [
],
'checks' => [
'list' => [
[
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"serverName\": \"<string>\",\n \"toolName\": \"<string>\",\n \"arguments\": {},\n \"action\": {},\n \"assertion\": {}\n }\n ],\n \"expectedOutput\": \"<string>\",\n \"iterations\": 5,\n \"isNegative\": true,\n \"scenario\": \"<string>\",\n \"models\": [\n {\n \"model\": \"<string>\",\n \"provider\": \"<string>\"\n }\n ],\n \"matchOptions\": {},\n \"checks\": {\n \"list\": [\n {}\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"serverName\": \"<string>\",\n \"toolName\": \"<string>\",\n \"arguments\": {},\n \"action\": {},\n \"assertion\": {}\n }\n ],\n \"expectedOutput\": \"<string>\",\n \"iterations\": 5,\n \"isNegative\": true,\n \"scenario\": \"<string>\",\n \"models\": [\n {\n \"model\": \"<string>\",\n \"provider\": \"<string>\"\n }\n ],\n \"matchOptions\": {},\n \"checks\": {\n \"list\": [\n {}\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"serverName\": \"<string>\",\n \"toolName\": \"<string>\",\n \"arguments\": {},\n \"action\": {},\n \"assertion\": {}\n }\n ],\n \"expectedOutput\": \"<string>\",\n \"iterations\": 5,\n \"isNegative\": true,\n \"scenario\": \"<string>\",\n \"models\": [\n {\n \"model\": \"<string>\",\n \"provider\": \"<string>\"\n }\n ],\n \"matchOptions\": {},\n \"checks\": {\n \"list\": [\n {}\n ]\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
MCPJam API key (sk_…). Create one at Settings → API keys. Guest sessions cannot use the API, and API keys cannot manage other API keys.
Path Parameters
ID of the hosted project that contains the server.
Eval suite ID, as returned by POST /eval-runs.
Eval case id.
Body
Partial update. Every field is optional; omitted fields are left as they are. steps REPLACES the definition rather than merging into it.
1REPLACES the case's test definition wholesale when provided.
1Show child attributes
Show child attributes
1 <= x <= 10Show child attributes
Show child attributes
null clears the case override and inherits the suite's.
null clears the case override.
Show child attributes
Show child attributes
Response
The updated case.
A persisted eval case, in the public steps-first shape. Note this is NOT EvalTestCase, which is the INLINE authoring shape accepted by suite creation.
Ordered test steps. A prompt step is a model turn; a single model-free toolCall step is a render-check; assert steps hold the expectations.
1Show child attributes
Show child attributes
1 <= x <= 10When true, the case passes if NO tools are called.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
curl --request PATCH \
--url https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"steps": [
{
"id": "<string>",
"prompt": "<string>",
"serverName": "<string>",
"toolName": "<string>",
"arguments": {},
"action": {},
"assertion": {}
}
],
"expectedOutput": "<string>",
"iterations": 5,
"isNegative": true,
"scenario": "<string>",
"models": [
{
"model": "<string>",
"provider": "<string>"
}
],
"matchOptions": {},
"checks": {
"list": [
{}
]
}
}
'import requests
url = "https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId}"
payload = {
"title": "<string>",
"steps": [
{
"id": "<string>",
"prompt": "<string>",
"serverName": "<string>",
"toolName": "<string>",
"arguments": {},
"action": {},
"assertion": {}
}
],
"expectedOutput": "<string>",
"iterations": 5,
"isNegative": True,
"scenario": "<string>",
"models": [
{
"model": "<string>",
"provider": "<string>"
}
],
"matchOptions": {},
"checks": { "list": [{}] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
steps: [
{
id: '<string>',
prompt: '<string>',
serverName: '<string>',
toolName: '<string>',
arguments: {},
action: {},
assertion: {}
}
],
expectedOutput: '<string>',
iterations: 5,
isNegative: true,
scenario: '<string>',
models: [{model: '<string>', provider: '<string>'}],
matchOptions: {},
checks: {list: [{}]}
})
};
fetch('https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'steps' => [
[
'id' => '<string>',
'prompt' => '<string>',
'serverName' => '<string>',
'toolName' => '<string>',
'arguments' => [
],
'action' => [
],
'assertion' => [
]
]
],
'expectedOutput' => '<string>',
'iterations' => 5,
'isNegative' => true,
'scenario' => '<string>',
'models' => [
[
'model' => '<string>',
'provider' => '<string>'
]
],
'matchOptions' => [
],
'checks' => [
'list' => [
[
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"serverName\": \"<string>\",\n \"toolName\": \"<string>\",\n \"arguments\": {},\n \"action\": {},\n \"assertion\": {}\n }\n ],\n \"expectedOutput\": \"<string>\",\n \"iterations\": 5,\n \"isNegative\": true,\n \"scenario\": \"<string>\",\n \"models\": [\n {\n \"model\": \"<string>\",\n \"provider\": \"<string>\"\n }\n ],\n \"matchOptions\": {},\n \"checks\": {\n \"list\": [\n {}\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"serverName\": \"<string>\",\n \"toolName\": \"<string>\",\n \"arguments\": {},\n \"action\": {},\n \"assertion\": {}\n }\n ],\n \"expectedOutput\": \"<string>\",\n \"iterations\": 5,\n \"isNegative\": true,\n \"scenario\": \"<string>\",\n \"models\": [\n {\n \"model\": \"<string>\",\n \"provider\": \"<string>\"\n }\n ],\n \"matchOptions\": {},\n \"checks\": {\n \"list\": [\n {}\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases/{caseId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"serverName\": \"<string>\",\n \"toolName\": \"<string>\",\n \"arguments\": {},\n \"action\": {},\n \"assertion\": {}\n }\n ],\n \"expectedOutput\": \"<string>\",\n \"iterations\": 5,\n \"isNegative\": true,\n \"scenario\": \"<string>\",\n \"models\": [\n {\n \"model\": \"<string>\",\n \"provider\": \"<string>\"\n }\n ],\n \"matchOptions\": {},\n \"checks\": {\n \"list\": [\n {}\n ]\n }\n}"
response = http.request(request)
puts response.read_body
