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

Function toolResponse

coderd/x/chatd/chattool/chattool.go:28–30  ·  view source on GitHub ↗

toolResponse builds a fantasy.ToolResponse from a JSON-serializable result map. The map constraint ensures all tool results serialize to JSON objects so the frontend can safely parse them.

(result map[string]any)

Source from the content-addressed store, hash-verified

26// result map. The map constraint ensures all tool results serialize
27// to JSON objects so the frontend can safely parse them.
28func toolResponse(result map[string]any) fantasy.ToolResponse {
29 return marshalToolResponse(result)
30}
31
32// buildToolResponse marshals a buildErrorResult into a tool response.
33// Separate from toolResponse to keep the map[string]any constraint

Callers 12

ReadSkillFunction · 0.85
ReadSkillFileFunction · 0.85
CreateWorkspaceFunction · 0.85
executeEditFilesToolFunction · 0.85
StartWorkspaceFunction · 0.85
executeReadFileToolFunction · 0.85
executeWriteFileToolFunction · 0.85
executeProposePlanToolFunction · 0.85
ReadTemplateFunction · 0.85
executeAttachFileToolFunction · 0.85
ListTemplatesFunction · 0.85
StopWorkspaceFunction · 0.85

Calls 1

marshalToolResponseFunction · 0.85

Tested by

no test coverage detected