MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / StripInjectedMessages

Function StripInjectedMessages

internal/toolinjection/strip.go:22–25  ·  view source on GitHub ↗

StripInjectedMessages removes any tool call / tool result message pairs that were previously injected by this package. It returns cleaned JSON. format must be "openai", "openai-responses", or "claude".

(rawJSON []byte, format string)

Source from the content-addressed store, hash-verified

20//
21// format must be "openai", "openai-responses", or "claude".
22func StripInjectedMessages(rawJSON []byte, format string) []byte {
23 cleaned, _ := StripAndCaptureInjectedMessages(rawJSON, format)
24 return cleaned
25}
26
27// StripAndCaptureInjectedMessages removes injected tool call / result pairs
28// and also extracts the content of tool results produced by injected calls.

Calls 1