From 79a9f437d74893b21eea123dc3c5377ffa1ddb94 Mon Sep 17 00:00:00 2001 From: "blinkagent[bot]" <237617714+blinkagent[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 11:37:29 -0700 Subject: [PATCH] feat(coderd/x/chatd/chattool): add description tags to tool parameter structs (#24394) --- coderd/x/chatd/chattool/createworkspace.go | 6 +++--- coderd/x/chatd/chattool/listtemplates.go | 4 ++-- coderd/x/chatd/chattool/readtemplate.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/coderd/x/chatd/chattool/createworkspace.go b/coderd/x/chatd/chattool/createworkspace.go index 2d40608dc6..d97c9ea014 100644 --- a/coderd/x/chatd/chattool/createworkspace.go +++ b/coderd/x/chatd/chattool/createworkspace.go @@ -74,9 +74,9 @@ type CreateWorkspaceOptions struct { } type createWorkspaceArgs struct { - TemplateID string `json:"template_id"` - Name string `json:"name,omitempty"` - Parameters map[string]string `json:"parameters,omitempty"` + TemplateID string `json:"template_id" description:"The UUIDv4 of the template to create the workspace from. Obtain this from list_templates."` + Name string `json:"name,omitempty" description:"The name of the workspace to create. If not provided, a random name will be generated."` + Parameters map[string]string `json:"parameters,omitempty" description:"Key-value pairs of template parameters to use when creating the workspace. Obtain available parameters from read_template."` } // CreateWorkspace returns a tool that creates a new workspace from a diff --git a/coderd/x/chatd/chattool/listtemplates.go b/coderd/x/chatd/chattool/listtemplates.go index 82a2e3e926..df5af5a2f3 100644 --- a/coderd/x/chatd/chattool/listtemplates.go +++ b/coderd/x/chatd/chattool/listtemplates.go @@ -27,8 +27,8 @@ type ListTemplatesOptions struct { } type listTemplatesArgs struct { - Query string `json:"query,omitempty"` - Page int `json:"page,omitempty"` + Query string `json:"query,omitempty" description:"Optional text to filter templates by name or description."` + Page int `json:"page,omitempty" description:"Page number for pagination (starts at 1). Each page returns up to 10 templates."` } // ListTemplates returns a tool that lists available workspace templates. diff --git a/coderd/x/chatd/chattool/readtemplate.go b/coderd/x/chatd/chattool/readtemplate.go index 0d82152556..3b87b4d8b0 100644 --- a/coderd/x/chatd/chattool/readtemplate.go +++ b/coderd/x/chatd/chattool/readtemplate.go @@ -19,7 +19,7 @@ type ReadTemplateOptions struct { } type readTemplateArgs struct { - TemplateID string `json:"template_id"` + TemplateID string `json:"template_id" description:"The UUIDv4 of the template to read details for. Obtain this from list_templates."` } // ReadTemplate returns a tool that retrieves details about a specific