@@ -49,48 +49,48 @@ const (
49type SelectedModel struct {
49type SelectedModel struct {
50 // The model id as used by the provider API.
50 // The model id as used by the provider API.
51 // Required.
51 // Required.
52− Model string `json:"model"`
52+ Model string `json:"model" jsonschema:"required,description=The model ID as used by the provider API,example=gpt-4o"`
53 // The model provider, same as the key/id used in the providers config.
53 // The model provider, same as the key/id used in the providers config.
54 // Required.
54 // Required.
55− Provider string `json:"provider"`
55+ Provider string `json:"provider" jsonschema:"required,description=The model provider ID that matches a key in the providers config,example=openai"`
57 // Only used by models that use the openai provider and need this set.
57 // Only used by models that use the openai provider and need this set.
58− ReasoningEffort string `json:"reasoning_effort,omitempty"`
58+ ReasoningEffort string `json:"reasoning_effort,omitempty" jsonschema:"description=Reasoning effort level for OpenAI models that support it,enum=low,enum=medium,enum=high"`
60 // Overrides the default model configuration.
60 // Overrides the default model configuration.
61− MaxTokens int64 `json:"max_tokens,omitempty"`
61+ MaxTokens int64 `json:"max_tokens,omitempty" jsonschema:"description=Maximum number of tokens for model responses,minimum=1,maximum=200000,example=4096"`
63 // Used by anthropic models that can reason to indicate if the model should think.
63 // Used by anthropic models that can reason to indicate if the model should think.
64− Think bool `json:"think,omitempty"`
64+ Think bool `json:"think,omitempty" jsonschema:"description=Enable thinking mode for Anthropic models that support reasoning"`
67type ProviderConfig struct {
67type ProviderConfig struct {
68 // The provider's id.
68 // The provider's id.
69− ID string `json:"id,omitempty"`
69+ ID string `json:"id,omitempty" jsonschema:"description=Unique identifier for the provider,example=openai"`
70 // The provider's name, used for display purposes.
70 // The provider's name, used for display purposes.
71− Name string `json:"name,omitempty"`
71+ Name string `json:"name,omitempty" jsonschema:"description=Human-readable name for the provider,example=OpenAI"`
72 // The provider's API endpoint.
72 // The provider's API endpoint.
73− BaseURL string `json:"base_url,omitempty"`
73+ BaseURL string `json:"base_url,omitempty" jsonschema:"description=Base URL for the provider's API,format=uri,example=https://api.openai.com/v1"`
74 // The provider type, e.g. "openai", "anthropic", etc. if empty it defaults to openai.
74 // The provider type, e.g. "openai", "anthropic", etc. if empty it defaults to openai.
75− Type catwalk.Type `json:"type,omitempty"`
75+ Type catwalk.Type `json:"type,omitempty" jsonschema:"description=Provider type that determines the API format,enum=openai,enum=anthropic,enum=gemini,enum=azure,enum=vertexai,default=openai"`
76 // The provider's API key.
76 // The provider's API key.
77− APIKey string `json:"api_key,omitempty"`
77+ APIKey string `json:"api_key,omitempty" jsonschema:"description=API key for authentication with the provider,example=$OPENAI_API_KEY"`
78 // Marks the provider as disabled.
78 // Marks the provider as disabled.
79− Disable bool `json:"disable,omitempty"`
79+ Disable bool `json:"disable,omitempty" jsonschema:"description=Whether this provider is disabled,default=false"`
81 // Custom system prompt prefix.
81 // Custom system prompt prefix.
82− SystemPromptPrefix string `json:"system_prompt_prefix,omitempty"`
82+ SystemPromptPrefix string `json:"system_prompt_prefix,omitempty" jsonschema:"description=Custom prefix to add to system prompts for this provider"`
84 // Extra headers to send with each request to the provider.
84 // Extra headers to send with each request to the provider.
85− ExtraHeaders map[string]string `json:"extra_headers,omitempty"`
85+ ExtraHeaders map[string]string `json:"extra_headers,omitempty" jsonschema:"description=Additional HTTP headers to send with requests"`
86 // Extra body
86 // Extra body
87− ExtraBody map[string]any `json:"extra_body,omitempty"`
87+ ExtraBody map[string]any `json:"extra_body,omitempty" jsonschema:"description=Additional fields to include in request bodies"`
89 // Used to pass extra parameters to the provider.
89 // Used to pass extra parameters to the provider.
90 ExtraParams map[string]string `json:"-"`
90 ExtraParams map[string]string `json:"-"`
92 // The provider models
92 // The provider models
93− Models []catwalk.Model `json:"models,omitempty"`
93+ Models []catwalk.Model `json:"models,omitempty" jsonschema:"description=List of models available from this provider"`
96type MCPType string
96type MCPType string
@@ -102,41 +102,41 @@ const (
104type MCPConfig struct {
104type MCPConfig struct {
105− Command string `json:"command,omitempty" `
105+ Command string `json:"command,omitempty" jsonschema:"description=Command to execute for stdio MCP servers,example=npx"`
106− Env map[string]string `json:"env,omitempty"`
106+ Env map[string]string `json:"env,omitempty" jsonschema:"description=Environment variables to set for the MCP server"`
107− Args []string `json:"args,omitempty"`
107+ Args []string `json:"args,omitempty" jsonschema:"description=Arguments to pass to the MCP server command"`
108− Type MCPType `json:"type"`
108+ Type MCPType `json:"type" jsonschema:"required,description=Type of MCP connection,enum=stdio,enum=sse,enum=http,default=stdio"`
109− URL string `json:"url,omitempty"`
109+ URL string `json:"url,omitempty" jsonschema:"description=URL for HTTP or SSE MCP servers,format=uri,example=http://localhost:3000/mcp"`
110− Disabled bool `json:"disabled,omitempty"`
110+ Disabled bool `json:"disabled,omitempty" jsonschema:"description=Whether this MCP server is disabled,default=false"`
112 // TODO: maybe make it possible to get the value from the env
112 // TODO: maybe make it possible to get the value from the env
113− Headers map[string]string `json:"headers,omitempty"`
113+ Headers map[string]string `json:"headers,omitempty" jsonschema:"description=HTTP headers for HTTP/SSE MCP servers"`
116type LSPConfig struct {
116type LSPConfig struct {
117− Disabled bool `json:"enabled,omitempty"`
117+ Disabled bool `json:"enabled,omitempty" jsonschema:"description=Whether this LSP server is disabled,default=false"`
118− Command string `json:"command"`
118+ Command string `json:"command" jsonschema:"required,description=Command to execute for the LSP server,example=gopls"`
119− Args []string `json:"args,omitempty"`
119+ Args []string `json:"args,omitempty" jsonschema:"description=Arguments to pass to the LSP server command"`
120− Options any `json:"options,omitempty"`
120+ Options any `json:"options,omitempty" jsonschema:"description=LSP server-specific configuration options"`
123type TUIOptions struct {
123type TUIOptions struct {
124− CompactMode bool `json:"compact_mode,omitempty"`
124+ CompactMode bool `json:"compact_mode,omitempty" jsonschema:"description=Enable compact mode for the TUI interface,default=false"`
125 // Here we can add themes later or any TUI related options
125 // Here we can add themes later or any TUI related options
128type Permissions struct {
128type Permissions struct {
129− AllowedTools []string `json:"allowed_tools,omitempty"` // Tools that don't require permission prompts
129+ AllowedTools []string `json:"allowed_tools,omitempty" jsonschema:"description=List of tools that don't require permission prompts,example=bash,example=view"` // Tools that don't require permission prompts
130− SkipRequests bool `json:"-"` // Automatically accept all permissions (YOLO mode)
130+ SkipRequests bool `json:"-"` // Automatically accept all permissions (YOLO mode)
133type Options struct {
133type Options struct {
134− ContextPaths []string `json:"context_paths,omitempty"`
134+ ContextPaths []string `json:"context_paths,omitempty" jsonschema:"description=Paths to files containing context information for the AI,example=.cursorrules,example=CRUSH.md"`
135− TUI *TUIOptions `json:"tui,omitempty"`
135+ TUI *TUIOptions `json:"tui,omitempty" jsonschema:"description=Terminal user interface options"`
136− Debug bool `json:"debug,omitempty"`
136+ Debug bool `json:"debug,omitempty" jsonschema:"description=Enable debug logging,default=false"`
137− DebugLSP bool `json:"debug_lsp,omitempty"`
137+ DebugLSP bool `json:"debug_lsp,omitempty" jsonschema:"description=Enable debug logging for LSP servers,default=false"`
138− DisableAutoSummarize bool `json:"disable_auto_summarize,omitempty"`
138+ DisableAutoSummarize bool `json:"disable_auto_summarize,omitempty" jsonschema:"description=Disable automatic conversation summarization,default=false"`
139− DataDirectory string `json:"data_directory,omitempty"` // Relative to the cwd
139+ DataDirectory string `json:"data_directory,omitempty" jsonschema:"description=Directory for storing application data (relative to working directory),default=.crush,example=.crush"` // Relative to the cwd
142type MCPs map[string]MCPConfig
142type MCPs map[string]MCPConfig
@@ -219,7 +219,7 @@ type Agent struct {
219 // This is the id of the system prompt used by the agent
219 // This is the id of the system prompt used by the agent
220 Disabled bool `json:"disabled,omitempty"`
220 Disabled bool `json:"disabled,omitempty"`
222− Model SelectedModelType `json:"model"`
222+ Model SelectedModelType `json:"model" jsonschema:"required,description=The model type to use for this agent,enum=large,enum=small,default=large"`
224 // The available tools for the agent
224 // The available tools for the agent
225 // if this is nil, all tools are available
225 // if this is nil, all tools are available
@@ -242,18 +242,18 @@ type Agent struct {
242// Config holds the configuration for crush.
242// Config holds the configuration for crush.
243type Config struct {
243type Config struct {
244 // We currently only support large/small as values here.
244 // We currently only support large/small as values here.
245− Models map[SelectedModelType]SelectedModel `json:"models,omitempty"`
245+ Models map[SelectedModelType]SelectedModel `json:"models,omitempty" jsonschema:"description=Model configurations for different model types,example={\"large\":{\"model\":\"gpt-4o\",\"provider\":\"openai\"}}"`
247 // The providers that are configured
247 // The providers that are configured
248− Providers *csync.Map[string, ProviderConfig] `json:"providers,omitempty"`
248+ Providers *csync.Map[string, ProviderConfig] `json:"providers,omitempty" jsonschema:"description=AI provider configurations"`
250− MCP MCPs `json:"mcp,omitempty"`
250+ MCP MCPs `json:"mcp,omitempty" jsonschema:"description=Model Context Protocol server configurations"`
252− LSP LSPs `json:"lsp,omitempty"`
252+ LSP LSPs `json:"lsp,omitempty" jsonschema:"description=Language Server Protocol configurations"`
254− Options *Options `json:"options,omitempty"`
254+ Options *Options `json:"options,omitempty" jsonschema:"description=General application options"`
256− Permissions *Permissions `json:"permissions,omitempty"`
256+ Permissions *Permissions `json:"permissions,omitempty" jsonschema:"description=Permission settings for tool usage"`
258 // Internal
258 // Internal
259 workingDir string `json:"-"`
259 workingDir string `json:"-"`