@@ -49,48 +49,48 @@ const (
4949type SelectedModel struct {
5050 // The model id as used by the provider API.
5151 // 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"`
5353 // The model provider, same as the key/id used in the providers config.
5454 // 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"`
5656
5757 // 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"`
5959
6060 // 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"`
6262
6363 // 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"`
6565}
6666
6767type ProviderConfig struct {
6868 // 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"`
7070 // 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"`
7272 // 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"`
7474 // 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"`
7676 // 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"`
7878 // 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"`
8080
8181 // 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"`
8383
8484 // 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"`
8686 // 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"`
8888
8989 // Used to pass extra parameters to the provider.
9090 ExtraParams map[string]string `json:"-"`
9191
9292 // 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"`
9494}
9595
9696type MCPType string
@@ -102,41 +102,41 @@ const (
102102)
103103
104104type MCPConfig struct {
105− Command string `json:"command,omitempty" `
106− Env map[string]string `json:"env,omitempty"`
107− Args []string `json:"args,omitempty"`
108− Type MCPType `json:"type"`
109− URL string `json:"url,omitempty"`
110− Disabled bool `json:"disabled,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" jsonschema:"description=Environment variables to set for the MCP server"`
107+ Args []string `json:"args,omitempty" jsonschema:"description=Arguments to pass to the MCP server command"`
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" jsonschema:"description=URL for HTTP or SSE MCP servers,format=uri,example=http://localhost:3000/mcp"`
110+ Disabled bool `json:"disabled,omitempty" jsonschema:"description=Whether this MCP server is disabled,default=false"`
111111
112112 // 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"`
114114}
115115
116116type LSPConfig struct {
117− Disabled bool `json:"enabled,omitempty"`
118− Command string `json:"command"`
119− Args []string `json:"args,omitempty"`
120− Options any `json:"options,omitempty"`
117+ Disabled bool `json:"enabled,omitempty" jsonschema:"description=Whether this LSP server is disabled,default=false"`
118+ Command string `json:"command" jsonschema:"required,description=Command to execute for the LSP server,example=gopls"`
119+ Args []string `json:"args,omitempty" jsonschema:"description=Arguments to pass to the LSP server command"`
120+ Options any `json:"options,omitempty" jsonschema:"description=LSP server-specific configuration options"`
121121}
122122
123123type 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"`
125125 // Here we can add themes later or any TUI related options
126126}
127127
128128type Permissions struct {
129− AllowedTools []string `json:"allowed_tools,omitempty"` // Tools that don't require permission prompts
130− SkipRequests bool `json:"-"` // Automatically accept all permissions (YOLO mode)
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)
131131}
132132
133133type Options struct {
134− ContextPaths []string `json:"context_paths,omitempty"`
135− TUI *TUIOptions `json:"tui,omitempty"`
136− Debug bool `json:"debug,omitempty"`
137− DebugLSP bool `json:"debug_lsp,omitempty"`
138− DisableAutoSummarize bool `json:"disable_auto_summarize,omitempty"`
139− DataDirectory string `json:"data_directory,omitempty"` // Relative to the cwd
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" jsonschema:"description=Terminal user interface options"`
136+ Debug bool `json:"debug,omitempty" jsonschema:"description=Enable debug logging,default=false"`
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" jsonschema:"description=Disable automatic conversation summarization,default=false"`
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
140140}
141141
142142type MCPs map[string]MCPConfig
@@ -219,7 +219,7 @@ type Agent struct {
219219 // This is the id of the system prompt used by the agent
220220 Disabled bool `json:"disabled,omitempty"`
221221
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"`
223223
224224 // The available tools for the agent
225225 // if this is nil, all tools are available
@@ -242,18 +242,18 @@ type Agent struct {
242242// Config holds the configuration for crush.
243243type Config struct {
244244 // 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\"}}"`
246246
247247 // 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"`
249249
250− MCP MCPs `json:"mcp,omitempty"`
250+ MCP MCPs `json:"mcp,omitempty" jsonschema:"description=Model Context Protocol server configurations"`
251251
252− LSP LSPs `json:"lsp,omitempty"`
252+ LSP LSPs `json:"lsp,omitempty" jsonschema:"description=Language Server Protocol configurations"`
253253
254− Options *Options `json:"options,omitempty"`
254+ Options *Options `json:"options,omitempty" jsonschema:"description=General application options"`
255255
256− Permissions *Permissions `json:"permissions,omitempty"`
256+ Permissions *Permissions `json:"permissions,omitempty" jsonschema:"description=Permission settings for tool usage"`
257257
258258 // Internal
259259 workingDir string `json:"-"`