MCPcopy Create free account
hub / github.com/compozy/agh / sanitizeToolInvokeResponse

Function sanitizeToolInvokeResponse

internal/cli/client_tools.go:219–229  ·  view source on GitHub ↗
(response ToolInvokeResponseRecord)

Source from the content-addressed store, hash-verified

217}
218
219func sanitizeToolInvokeResponse(response ToolInvokeResponseRecord) ToolInvokeResponseRecord {
220 response.Result.Preview = redactToolDiagnostic(response.Result.Preview)
221 response.Result.Structured = redactToolRawJSON(response.Result.Structured)
222 response.Result.Metadata = redactToolMetadata(response.Result.Metadata)
223 for i := range response.Result.Content {
224 response.Result.Content[i].Text = redactToolDiagnostic(response.Result.Content[i].Text)
225 response.Result.Content[i].Data = redactToolRawJSON(response.Result.Content[i].Data)
226 response.Result.Content[i].Metadata = redactToolMetadata(response.Result.Content[i].Metadata)
227 }
228 return response
229}
230
231func redactToolRawJSON(raw json.RawMessage) json.RawMessage {
232 if len(raw) == 0 {

Callers 3

newToolInvokeCommandFunction · 0.85
InvokeToolMethod · 0.85

Calls 3

redactToolDiagnosticFunction · 0.85
redactToolRawJSONFunction · 0.85
redactToolMetadataFunction · 0.85

Tested by 1