JSON Schema stays inspectable, portable, and honest.
SCHEMA-FIRST AGENT TOOLING
One contract.
Every surface.
Mnemotek turns one literal JSON Schema and one runner into a validated CLI, MCP tool, agent skill, and slash command. Build the contract once; every surface stays synchronized.
Why it matters: your users get the interface they prefer, while you stop duplicating arguments, defaults, validation, and result handling across four tools.
Your schema is the source of truth.
Define a command once. Mnemotek carries its name, description, arguments, defaults, validation, and result contract into every interface without making you maintain four drifting toolchains.
FromSchema keeps TypeScript aligned with runtime data.
AJV validates configuration and results at the boundary.
One schema in. Four surfaces out.
This is the whole move: describe inspect once, then let Mnemotek carry the same argument contract into every place an agent or human can call it.
path: string · required · validated$ project-tool inspect --path src
✓ validated against inspectSchema
→ { "path": "src", "files": 18, "status": "ready" }Build once. Hit every channel.
A small manifest hits hard.
import { Mnemotek } from '@studnicky/mnemotek';
const inspectSchema = {
type: 'object',
properties: { path: { type: 'string' } },
required: ['path']
} as const;
const tool = new Mnemotek({
name: 'project-tool',
description: 'Project automation.'
});
tool.command({ name: 'inspect', description: 'Inspect a path.',
schema: inspectSchema, runner: async ({ path }) => ({ path }) });Register the command once. The CLI, MCP adapter, skill manifest, and slash-command renderer read the same manifest.
CSS-cascade thinking for config.
Defaults are structural. Package config, config files, environment variables, and CLI arguments layer in order, with the most specific source winning. No mystery values. No silent drift.
