Skip to main content

ModDefinition

type

Everything a mod contributes, in one object literal. `metadata` is the only required field. Every other slot is optional and becomes an empty list when omitted, so a mod declares only the surfaces it actually has. Two slots are easy to misplace. Palette commands and chat slash commands both live in the single top-level `commands` array. Tools live under `ai.tools`, not in `commands`, because the model calls them rather than the user.

type ModDefinition = Partial<Omit<Mod, 'metadata' | 'agents' | 'tools' | 'prompts'>> & { ai?: AiModDefinition; metadata: ModMetadata; prompts?: readonly Prompt[] }

Import

import { ModDefinition } from '@modular/sdk';

Notes

category
Authoring