MCP Reference
MCP Examples
End-to-end examples for running comparisons, evaluations, and benchmarks via MCP.
All examples show the exact instructions to give your agent and the tool calls that result. The agent handles the async polling automatically when told to poll.
Example 1: Comparison with custom temperature
What you say to your agent:
“Run a comparison with the prompt ‘In one sentence, explain why agent-first SaaS will be bigger than human-oriented SaaS.’ Use GPT-6 Luna, Grok 4.5, Claude Sonnet 5, DeepSeek V4 Flash, and GPT-6.1 Terra. Temperature 0.9. No system prompt, no context. Poll every 5 seconds until complete then show me the results.”
What the agent does:
- Calls
list_modelsto confirm model IDs (optional but good practice). - Calls
run_comparison:
{
"prompt": "In one sentence, explain why agent-first SaaS will be bigger than human-oriented SaaS.",
"models": {
"openai": ["gpt-6-luna", "gpt-6.1-terra"],
"grok": "grok-4.5",
"anthropic": "claude-sonnet-5",
"together": "deepseek-ai/DeepSeek-V4-Flash-0731"
},
"params": {
"temperature": 0.9
}
}
- Receives
job_id. Callspoll_jobevery 5 seconds. - When
status: complete, reads results from the poll response.
Results shape:
{
"comparison_id": "cmp_...",
"results": [
{
"provider": "openai",
"model": "gpt-6-luna",
"response_text": "...",
"latency_ms": 1240,
"cost_usd": 0.000004,
"tokens_input": 22,
"tokens_output": 28
}
]
}
Example 2: Evaluation with gold standard
Use this when you have a known correct answer and want to score how close each model gets.
What you say to your agent:
“Evaluate the prompt ‘What is the capital of France?’ against the gold standard answer ‘Paris’. Use GPT-6 Luna and Claude Haiku 4.5. Poll until complete.”
Tool call – run_evaluation:
{
"prompt": "What is the capital of France?",
"models": {
"openai": "gpt-6-luna",
"anthropic": "claude-haiku-4-5-20251001"
},
"expected_output": "Paris"
}
Results shape:
{
"results": [
{
"provider": "openai",
"model": "gpt-6-luna",
"response_text": "The capital of France is Paris.",
"quality_score": 92.5,
"scores": [
{
"criterion": "coverage",
"score": 100,
"reasoning": "Response contains the correct answer."
}
]
}
]
}
Example 3: Create and run a benchmark
Use this when you want to track a prompt over time or run it on a schedule.
What you say to your agent:
“Create a benchmark called ‘Agent SaaS thesis’ with the prompt ‘In one sentence, explain why agent-first SaaS will be bigger than human-oriented SaaS.’ Use GPT-6 Luna and Grok 4.5. Manual schedule. Then trigger a run and poll until complete.”
Step 1 – create_benchmark:
{
"name": "Agent SaaS thesis",
"prompt": "In one sentence, explain why agent-first SaaS will be bigger than human-oriented SaaS.",
"models": {
"openai": "gpt-6-luna",
"grok": "grok-4.5"
},
"schedule": "manual"
}
Returns suite_id.
Step 2 – trigger_benchmark_run:
{
"suite_id": "suite_..."
}
Returns job_id. Poll with poll_job until complete.
Results shape:
{
"run_id": "run_...",
"model_metrics": [
{
"provider": "openai",
"model": "gpt-6-luna",
"cost_usd": 0.000004,
"latency_ms": 1240,
"tokens_output": 28
},
{
"provider": "grok",
"model": "grok-4.5",
"cost_usd": 0.000180,
"latency_ms": 2100,
"tokens_output": 31
}
]
}
Example 4: Multiple models from the same provider
Pass an array of model IDs as the value for a provider to include more than one model from that provider in a single run.
What you say to your agent:
“Compare GPT-6 Luna and GPT-6.1 Terra on the prompt ‘Summarise this support ticket in one sentence: customer says order arrived damaged, wants refund.’ Poll until complete.”
Tool call – run_comparison:
{
"prompt": "Summarise this support ticket in one sentence: customer says order arrived damaged, wants refund.",
"models": {
"openai": ["gpt-6-luna", "gpt-6.1-terra"]
}
}
You can mix single-model and multi-model providers in the same call:
{
"models": {
"openai": ["gpt-6-luna", "gpt-6.1-terra"],
"anthropic": "claude-sonnet-5",
"grok": "grok-4.5"
}
}
All models run in parallel. Results return cost, latency, and response text per model.
Example 5: Retrieve a past comparison
What you say to your agent:
“Get comparison cmp_abc123 and summarise the results.”
Tool call – get_comparison:
{
"comparison_id": "cmp_abc123"
}
Returns the full comparison record including all model responses, cost, and latency.
Example 6: Check benchmark run history
What you say to your agent:
“List the last 5 runs for benchmark suite_abc123 and tell me which model had the lowest cost on each run.”
Tool call – list_benchmark_runs:
{
"suite_id": "suite_abc123",
"limit": 5
}
Returns per-model metrics for each run. The agent can then summarise cost trends across runs.
Prompting tips for agents
- Always tell the agent to poll until complete. Without this instruction some agents call
run_comparisonand stop without polling. - Say “poll every 5 seconds” – this matches the server’s intended polling rate and avoids rate limit waste.
- Say “use model IDs from list_models” if you are unsure of exact IDs. The agent will call
list_modelsfirst and pick the right IDs for your tier. - The
modelsfield is a map of provider to model ID. The value can be a single string or an array of strings for multiple models from the same provider. If your agent passes a plain list or uses the wrong structure, correct it: “models should be a JSON object mapping provider name to a model ID string or an array of model ID strings.”
What’s next
- MCP Tools Reference – every field documented
- MCP Quickstart – connect your client