Score state for tennis, golf handicap differentials and cricket overs
Replays a tennis point sequence (ITF Rules of Tennis: games, deuce, tie-breaks, match tie-break, who serves), computes a golf Score Differential and Handicap Index (World Handicap System), or tallies a cricket innings ball by ball (overs.balls, wides and no-balls, maidens, wickets), for agents that must verify a reported score. Optionally checks a claimed score against the replay and names the first illegal point or ball. Does NOT apply the WHS soft/hard cap, exceptional-score reductions or 9-hole expected scores, tennis variants beyond No-Ad and the final-set options, or cricket penalty runs; those return unknown or unsupported.
What you get
Catches a mistold score or an impossible point sequence for one $0.005 call.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/score-state. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/score-state \
-H 'content-type: application/json' \
-d '{"sport":"tennis","tennis":{"points":"aaaabbbbaaaabbbbaabaaabbbbbbaaaaaa","bestOf":3,"claim":{"setsWon":[0,0]}}}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
sport | string; one of "tennis", "golf", "cricket" | yes | Selects which block below is read. |
tennis | object | no | For sport=tennis. |
golf | object | no | For sport=golf: a round, a list of differentials, or both. |
cricket | object | no | For sport=cricket: one innings, ball by ball. |
Example request body
{
"sport": "tennis",
"tennis": {
"points": "aaaabbbbaaaabbbbaabaaabbbbbbaaaaaa",
"bestOf": 3,
"claim": {
"setsWon": [
0,
0
]
}
}
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
sport | string | no | |
state | any | no | Sport-specific state. Tennis: setsWon, sets, games, points, gameScore, server, winner. Golf: scoreDifferential, handicapIndex and inputs. Cricket: overs, runs, wickets, extras, maidens, overSummaries. |
summary | string | no | One-line score. |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the creative-games-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent