types.ts•929 B
/**
* Parameter configuration for a tool
*/
export interface ParamConfig {
/** Parameter name (used as schema key) */
name: string;
/** Zod type: string, number, or boolean */
type: 'string' | 'number' | 'boolean';
/** Description shown to AI agent */
description: string;
/** CLI flag (e.g., '-m', '--force'). If absent, parameter is positional */
flag?: string;
/** Whether the parameter is required */
required: boolean;
}
/**
* Tool configuration from JSON config file
*/
export interface ToolConfig {
/** MCP tool name (e.g., 'git_commit') */
name: string;
/** Tool description shown to AI agent */
description: string;
/** CLI subcommand (e.g., 'commit' or 'remote add') */
subcommand: string;
/** Parameter definitions */
parameters: ParamConfig[];
}
/**
* Root configuration structure
*/
export interface Config {
/** Array of tool configurations */
tools: ToolConfig[];
}