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

Function findToolSchema

internal/sessions/session_injection.go:279–288  ·  view source on GitHub ↗

findToolSchema returns the schema map for a named tool, or nil.

(sess *Session, toolName string)

Source from the content-addressed store, hash-verified

277
278// findToolSchema returns the schema map for a named tool, or nil.
279func findToolSchema(sess *Session, toolName string) map[string]any {
280 sess.mu.Lock()
281 defer sess.mu.Unlock()
282 for _, t := range sess.Tools {
283 if t.Name == toolName {
284 return t.Schema
285 }
286 }
287 return nil
288}
289
290// AsInjectionRule converts a PendingAction (ActionToolCall) into a ToolCallInjectionRule
291// that can be used with the existing fabrication functions.

Callers 2

BuildReadArgumentsFunction · 0.85
BuildWriteArgumentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected