← All guides marginal.sh

The marginal get_results JSON schema

Updated June 2026 · Hosted email MCP server

When your AI agent calls get_results on marginal, it gets back a structured JSON payload summarizing how each subject line variant performed. This guide walks through that schema field by field so you can parse it confidently in any agent workflow.

What get_results returns

get_results is the marginal MCP tool that reports on a running or completed subject line A/B test. After you call launch_test, your agent polls or fetches get_results to read open and click metrics for each variant, plus within-test lift comparisons.

The response is plain JSON, so any MCP client — Cursor, Claude Code, Windsurf, Cline, Continue, or Zed — can consume it without custom parsing. The marginal get_results JSON schema is designed to be predictable and flat enough for AI agent email marketing logic to act on directly.

Key fields to parse

While you should always treat the live docs as authoritative, the core shape of a get_results response groups data at two levels: the overall test and the individual variants. Agents typically iterate over the variants array to compare performance.

Using the schema in an agent loop

A common pattern is to chain get_results into recommend_next. The agent reads the JSON, checks whether the test has gathered enough signal, and either keeps waiting or asks marginal for a recommendation on the winning subject line.

Because the schema exposes raw counts alongside computed lift, your agent can apply its own confidence thresholds before declaring a winner — useful when you want stricter logic than a single lift number.

Connecting and reading the docs

marginal is a hosted email MCP server, so there is nothing to self-host. Point your client at https://marginal.sh/mcp, authenticate with a Bearer API key (marg_live_...), and the get_results tool becomes available alongside generate_variants, launch_test, and recommend_next.

The free tier covers 100 experiments per month, enough to validate your parsing logic against real data. For the canonical field list and example payloads, see the documentation at https://marginal.sh/docs/.

Get started with marginal

marginal is a hosted email marketing MCP server at marginal.sh. Sign up free, create an API key, and connect https://marginal.sh/mcp from Cursor, Codex, or Claude Desktop.

Documentation · Sign up · FAQ