API & MCP

Everything a person can do on Contract Bridge Score Calculator, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

  • POST https://playcardsbridgescore.usefulweb.app/api/v1/calculate – run Contract Bridge Score Calculator
  • GET https://playcardsbridgescore.usefulweb.app/api/v1/tool – inputs, output schema, examples
  • OpenAPI 3.1: /openapi.json · /openapi.yaml
  • Errors: application/problem+json; 422 includes per-field errors.

Contract Bridge Score Calculator

Scores one Contract Bridge deal by the scoring tables of the Laws of Duplicate Bridge: points for the tricks bid and made, overtricks, the bonus for making a doubled or redoubled contract, slam bonuses and the penalties for undertricks, not vulnerable or vulnerable, doubled or redoubled. Duplicate scoring adds the part-score or game bonus; rubber scoring splits the result into the points below the line (towards game, with your existing part score) and above it, with honours. Enter the other table’s score to get the IMP difference. The Playcards app scores every deal with the same engine.

Inputs of Contract Bridge Score Calculator
FieldTypeDefaultDescription
levelinteger4Contract level. Odd tricks bid: 1 (seven tricks) to 7 (all thirteen).
strainselect (C, D, H, S, N)"S"Trumps
doubledselect (0, 1, 2)"0"Doubled
vulnerablebooleanfalseDeclarer’s side vulnerable
tricksinteger10Tricks won by declarer’s side
scoringselect (duplicate, rubber)"duplicate"Scoring
partScoreinteger0Part score already below the line (rubber). Points the declarer’s side already has towards the current game.
honoursselect (none, four, five, aces)"none"Honours in one hand (rubber)
honoursSideselect (declarer, defenders)"declarer"Honours held by
otherTabletext—Other table’s score for the same side (optional). With a score from the other table the tool converts the difference to IMPs.

Example request

4♠ made with an overtrick, not vulnerable

curl -X POST https://playcardsbridgescore.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"level":4,"strain":"S","tricks":11}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

  • Streamable HTTP endpoint: https://playcardsbridgescore.usefulweb.app/mcp – protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake).
  • Tools: playcards_bridge_score
  • Local stdio connector: node src/mcp-stdio.ts --tool=playcards-bridge-score
{
  "mcpServers": {
    "playcards-bridge-score": { "type": "http", "url": "https://playcardsbridgescore.usefulweb.app/mcp" }
  }
}