---
title: SchemaPort
description: Define an AI tool schema once, then safely use it across OpenAI, Anthropic, Gemini and MCP.
url: https://pr-2-390be2854416.thally.app/
lastVerified: 2026-08-20T00:00:00.000Z
verifiedVersion: 0.1.0
---

# SchemaPort

Define an AI tool schema once, then safely use it across OpenAI, Anthropic, Gemini and MCP.

## One schema, four honest answers

A tool schema that works on one provider does not reliably work on another. The
same JSON is accepted by Anthropic, rejected by OpenAI's strict mode, and
accepted by Gemini only after a validation keyword stops binding anything.

SchemaPort is a local-first CLI. You keep one **canonical tool** — a `name`, an
optional `description`, and an `inputSchema` that is plain JSON Schema — and
SchemaPort answers four questions about it. Nothing but `probe` touches the
network, and everything else runs without an API key.

## The four capabilities

#### [check](/commands/check)

    Runs each provider's compatibility rules against your canonical schema and
    reports what is wrong, where, and whether `compile` can work around it.
    Static, local, no credentials.

#### [compile](/commands/compile)

    Writes the provider-native tool definition for each target, applying the
    minimum transformations required and recording every one of them in a
    manifest. It refuses rather than silently weakening your schema.

#### [probe](/commands/probe)

    The only capability that touches the network: it sends the compiled
    definition to the real API and reports whether the provider accepts it
    today. Probe is fully implemented and tested against mocked clients — no
    live provider call has been made in preparing this documentation.

#### [diff](/commands/diff)

    Compares two versions of your canonical schemas and classifies every change
    as breaking, non-breaking or informational. This is the CI gate that stops a
    new required property shipping unnoticed.

## The rule underneath all of it

SchemaPort never weakens your schema silently. A provider that accepts your
schema *after quietly dropping `minimum`* has not given you a working tool — it
has given you a tool that will eventually be called with a negative refund
amount.

So every change compilation makes is recorded and classified. A change that
preserves your contract compiles. A change that destroys a constraint is
**refused** until you explicitly accept it with `--allow-lossy`. And a change
that alters runtime behaviour always produces a warning, even when nothing was
lost. See [Safe and lossy compilation](/concepts/safe-and-lossy-compilation).

> **Note:**
The packages are not published to npm yet. The install path that works today is
a local workspace build — see [Installation](/installation).

## Start here

#### [The portability problem](/portability-problem)

    One `refund_order` schema, four different verdicts. Start here if you want
    to know why this product exists.

#### [Installation](/installation)

    Node 20 or newer, plus the local workspace build that works today.

#### [Quickstart](/quickstart)

    Point at a schema, run `check`, read the result, run `compile`, look at what
    came out. About five minutes.

## How the product is assembled

SchemaPort ships as six independent repositories. Provider rules live in
provider packages so they can be updated and released as providers change,
without touching the core or the CLI.

| Repository | Owns |
|---|---|
| [`core`](https://github.com/schemaport/core) | Canonical format, loading, diagnostics, compile policy, diff |
| [`cli`](https://github.com/schemaport/cli) | Commands, flags, output formats, exit codes, configuration |
| [`provider-openai`](https://github.com/schemaport/provider-openai) | OpenAI rules, transformations, probing |
| [`provider-anthropic`](https://github.com/schemaport/provider-anthropic) | Anthropic rules, transformations, probing |
| [`provider-gemini`](https://github.com/schemaport/provider-gemini) | Gemini rules, transformations, probing |
| [`provider-mcp`](https://github.com/schemaport/provider-mcp) | MCP rules, compilation, local validation |