MCPcopy Index your code
hub / github.com/coder/coder / buildToolResponse

Function buildToolResponse

coderd/x/chatd/chattool/chattool.go:35–37  ·  view source on GitHub ↗

buildToolResponse marshals a buildErrorResult into a tool response. Separate from toolResponse to keep the map[string]any constraint on the general helper while allowing typed error structs.

(r buildErrorResult)

Source from the content-addressed store, hash-verified

33// Separate from toolResponse to keep the map[string]any constraint
34// on the general helper while allowing typed error structs.
35func buildToolResponse(r buildErrorResult) fantasy.ToolResponse {
36 return marshalToolResponse(r)
37}
38
39// responseErrorResult converts a codersdk.Response into a structured
40// tool result. We return these via toolResponse rather than

Callers 2

buildFailureToolResponseFunction · 0.85
StopWorkspaceFunction · 0.85

Calls 1

marshalToolResponseFunction · 0.85

Tested by

no test coverage detected