kairos-lang-mcp

v1.1.2
io.github.azathothx/kairos-lang-mcp Checked 1 day ago Published 3 days ago

Evaluate (list/next) and validate Kairos schedule definitions; look up the descriptor reference

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

kairos_list Evaluate a Kairos definition over a range

All firings of each body expression in [from, to) (to is exclusive), with interval annotations and the coverage summary — the same CliReport as 'kairos list --json' (schema: https://kairos-lang.org/schema/cli-report.schema.json). tz is required: the IANA zone (or a fixed offset in the canonical form "±HH:MM", or "UTC" — the same values as a premise tz:) that labels and the [from, to) endpoints are read in (there is no "machine time zone" for an AI caller). If the definition declares tz: in its premise, evaluation uses that zone; tz here still decides the labels. Recommended practice: defi…

ParameterTypeDescription
from *stringStart of the range, YYYY-MM-DD (inclusive).
source *stringThe Kairos definition text (premise + body expressions). Up to 64 KB.
to *stringEnd of the range, YYYY-MM-DD (exclusive).
tz *stringIANA time zone for labels and the [from, to) endpoints, e.g. "Asia/Tokyo". Required.
explainbooleanAlso return results[].stages: per-stage point counts and intermediate values (the counterpart of a SQL execution plan).
supplyobjectStatic bundle resolving external() bindings: {binding | "premise.binding": {dates: ["YYYY-MM-DD", …] | instants: [epoch ms, …], covering, asof [, labels]}} — see https://kairos-lang.org/schema/s…

kairos_next Next N firings of a Kairos definition

The next n firings at or after from (default: today in tz), searching up to horizonYears (default 10) — the same CliReport as 'kairos next --json' (schema: https://kairos-lang.org/schema/cli-report.schema.json); found < requested means fewer than n firings exist within the horizon (the CLI's exit code 2). For files with a single body expression. tz is required: the IANA zone (or a fixed offset in the canonical form "±HH:MM", or "UTC" — the same values as a premise tz:) that labels and the [from, to) endpoints are read in (there is no "machine time zone" for an AI caller). If the definitio…

ParameterTypeDescription
source *stringThe Kairos definition text (premise + body expressions). Up to 64 KB.
tz *stringIANA time zone for labels and the [from, to) endpoints, e.g. "Asia/Tokyo". Required.
explainbooleanAlso return results[].stages: per-stage point counts and intermediate values (the counterpart of a SQL execution plan).
fromstringSearch start, YYYY-MM-DD (default: today in tz).
horizonYearsintegerSearch horizon in years (default 10).
nintegerHow many firings (default 1, at most 1000).
supplyobjectStatic bundle resolving external() bindings: {binding | "premise.binding": {dates: ["YYYY-MM-DD", …] | instants: [epoch ms, …], covering, asof [, labels]}} — see https://kairos-lang.org/schema/s…

kairos_validate Validate a Kairos definition without evaluating it

Checks lexing, syntax, static rules and premise resolution (and the shape of supply if given) by evaluating the empty window [today, today) in tz. Returns {ok, version, diagnostics: [{kind, message}]}. Coverage-related signals (annotations, runway) only appear with a real range in kairos_list. tz is required: the IANA zone (or a fixed offset in the canonical form "±HH:MM", or "UTC" — the same values as a premise tz:) that labels and the [from, to) endpoints are read in (there is no "machine time zone" for an AI caller). If the definition declares tz: in its premise, evaluation uses that zon…

ParameterTypeDescription
source *stringThe Kairos definition text (premise + body expressions). Up to 64 KB.
tz *stringIANA time zone for labels and the [from, to) endpoints, e.g. "Asia/Tokyo". Required.
supplyobjectStatic bundle resolving external() bindings: {binding | "premise.binding": {dates: ["YYYY-MM-DD", …] | instants: [epoch ms, …], covering, asof [, labels]}} — see https://kairos-lang.org/schema/s…

kairos_reference Read the Kairos descriptor reference

The reference page for one descriptor (e.g. "roll", "within", "nth", "segmentBy"; "README" lists them; "combinators", "sugar-definition", "table-literal" are the shared pages). Japanese is canonical; lang: "en" returns the English mirror. Unknown words return the list of available words.

ParameterTypeDescription
word *stringDescriptor name as written in a definition, e.g. "roll".
langstring"ja" (canonical, default) or "en".