Create an eval case
Adds one case to the suite. Both title and a non-empty steps array are required — steps is optional on the shared case shape so PATCH can be partial, but a case persisted without executable steps could never run. When models is omitted the suite’s configured model is used.
curl --request POST \
--url https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "lists files",
"steps": [
{
"id": "s1",
"kind": "prompt",
"prompt": "List the files in the project root."
},
{
"id": "s2",
"kind": "assert",
"assertion": {
"type": "toolCalledWith",
"toolName": "list_files",
"args": {
"args": {}
}
}
}
]
}
'import requests
url = "https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases"
payload = {
"title": "lists files",
"steps": [
{
"id": "s1",
"kind": "prompt",
"prompt": "List the files in the project root."
},
{
"id": "s2",
"kind": "assert",
"assertion": {
"type": "toolCalledWith",
"toolName": "list_files",
"args": { "args": {} }
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'lists files',
steps: [
{id: 's1', kind: 'prompt', prompt: 'List the files in the project root.'},
{
id: 's2',
kind: 'assert',
assertion: {type: 'toolCalledWith', toolName: 'list_files', args: {args: {}}}
}
]
})
};
fetch('https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'lists files',
'steps' => [
[
'id' => 's1',
'kind' => 'prompt',
'prompt' => 'List the files in the project root.'
],
[
'id' => 's2',
'kind' => 'assert',
'assertion' => [
'type' => 'toolCalledWith',
'toolName' => 'list_files',
'args' => [
'args' => [
]
]
]
]
]
]),
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"
payload := strings.NewReader("{\n \"title\": \"lists files\",\n \"steps\": [\n {\n \"id\": \"s1\",\n \"kind\": \"prompt\",\n \"prompt\": \"List the files in the project root.\"\n },\n {\n \"id\": \"s2\",\n \"kind\": \"assert\",\n \"assertion\": {\n \"type\": \"toolCalledWith\",\n \"toolName\": \"list_files\",\n \"args\": {\n \"args\": {}\n }\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"lists files\",\n \"steps\": [\n {\n \"id\": \"s1\",\n \"kind\": \"prompt\",\n \"prompt\": \"List the files in the project root.\"\n },\n {\n \"id\": \"s2\",\n \"kind\": \"assert\",\n \"assertion\": {\n \"type\": \"toolCalledWith\",\n \"toolName\": \"list_files\",\n \"args\": {\n \"args\": {}\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"lists files\",\n \"steps\": [\n {\n \"id\": \"s1\",\n \"kind\": \"prompt\",\n \"prompt\": \"List the files in the project root.\"\n },\n {\n \"id\": \"s2\",\n \"kind\": \"assert\",\n \"assertion\": {\n \"type\": \"toolCalledWith\",\n \"toolName\": \"list_files\",\n \"args\": {\n \"args\": {}\n }\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.
Body
Create one case. title and a non-empty steps array are both required — a case persisted without executable steps could never run.
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 created 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 POST \
--url https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "lists files",
"steps": [
{
"id": "s1",
"kind": "prompt",
"prompt": "List the files in the project root."
},
{
"id": "s2",
"kind": "assert",
"assertion": {
"type": "toolCalledWith",
"toolName": "list_files",
"args": {
"args": {}
}
}
}
]
}
'import requests
url = "https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases"
payload = {
"title": "lists files",
"steps": [
{
"id": "s1",
"kind": "prompt",
"prompt": "List the files in the project root."
},
{
"id": "s2",
"kind": "assert",
"assertion": {
"type": "toolCalledWith",
"toolName": "list_files",
"args": { "args": {} }
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'lists files',
steps: [
{id: 's1', kind: 'prompt', prompt: 'List the files in the project root.'},
{
id: 's2',
kind: 'assert',
assertion: {type: 'toolCalledWith', toolName: 'list_files', args: {args: {}}}
}
]
})
};
fetch('https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'lists files',
'steps' => [
[
'id' => 's1',
'kind' => 'prompt',
'prompt' => 'List the files in the project root.'
],
[
'id' => 's2',
'kind' => 'assert',
'assertion' => [
'type' => 'toolCalledWith',
'toolName' => 'list_files',
'args' => [
'args' => [
]
]
]
]
]
]),
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"
payload := strings.NewReader("{\n \"title\": \"lists files\",\n \"steps\": [\n {\n \"id\": \"s1\",\n \"kind\": \"prompt\",\n \"prompt\": \"List the files in the project root.\"\n },\n {\n \"id\": \"s2\",\n \"kind\": \"assert\",\n \"assertion\": {\n \"type\": \"toolCalledWith\",\n \"toolName\": \"list_files\",\n \"args\": {\n \"args\": {}\n }\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"lists files\",\n \"steps\": [\n {\n \"id\": \"s1\",\n \"kind\": \"prompt\",\n \"prompt\": \"List the files in the project root.\"\n },\n {\n \"id\": \"s2\",\n \"kind\": \"assert\",\n \"assertion\": {\n \"type\": \"toolCalledWith\",\n \"toolName\": \"list_files\",\n \"args\": {\n \"args\": {}\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.mcpjam.com/api/v1/projects/{projectId}/eval-suites/{suiteId}/cases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"lists files\",\n \"steps\": [\n {\n \"id\": \"s1\",\n \"kind\": \"prompt\",\n \"prompt\": \"List the files in the project root.\"\n },\n {\n \"id\": \"s2\",\n \"kind\": \"assert\",\n \"assertion\": {\n \"type\": \"toolCalledWith\",\n \"toolName\": \"list_files\",\n \"args\": {\n \"args\": {}\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body
