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

Function toolJSONResponse

coderd/x/chatd/subagent.go:1547–1553  ·  view source on GitHub ↗
(result map[string]any)

Source from the content-addressed store, hash-verified

1545}
1546
1547func toolJSONResponse(result map[string]any) fantasy.ToolResponse {
1548 data, err := json.Marshal(result)
1549 if err != nil {
1550 return fantasy.NewTextResponse("{}")
1551 }
1552 return fantasy.NewTextResponse(string(data))
1553}
1554
1555func toolJSONErrorResponse(result map[string]any) fantasy.ToolResponse {
1556 resp := toolJSONResponse(result)

Callers 2

subagentToolsMethod · 0.85
toolJSONErrorResponseFunction · 0.85

Calls 1

MarshalMethod · 0.45

Tested by

no test coverage detected