Skip to main content

Overview

A contract (contract.yaml) declares what a strategy needs to run: its parameters, required tables with column schemas, graph dependencies, and optional discovery hints. Contracts are the interface between strategy authors and the data-staging layer — they describe what data is needed without specifying how to fetch it. Contracts live alongside strategy code:

Contract Fields

Top-level

params

Each key is a parameter name; the value is a ParamSpec:

requires

requires.tables

Each key is a table name; the value is a TableSpec:

Column definitions

Each key is a column name; the value is a ColumnSpec: Semantic tags enable automatic field resolution via the graph — the resolver matches columns to data sources by shared semantic types.

discovery

Optional hints for orchestrators that auto-stage data: Each mcp_hint:

Validation

The following are enforced at parse time:
  • name must be non-empty
  • description must be non-empty
  • tags must contain at least one element

Examples

Minimal contract (graph-only, no tables)

Full contract with tables and discovery

Native-fetch contract (no tables)

Pinned-backend contract