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

Function PickWriteTool

internal/sessions/session_injection.go:108–112  ·  view source on GitHub ↗

PickWriteTool returns the best file-write tool name from the session's observed tools.

(sess *Session)

Source from the content-addressed store, hash-verified

106
107// PickWriteTool returns the best file-write tool name from the session's observed tools.
108func PickWriteTool(sess *Session) string {
109 return pickToolByPriority(sess, writeToolPriority, func(lower string) bool {
110 return lower == "write" || (strings.Contains(lower, "write") && strings.Contains(lower, "file"))
111 })
112}
113
114// ToolProfile returns cached tool names for injection, computing them on first call.
115// Caller does NOT need to hold the session lock.

Callers 9

HandleMethod · 0.92
TestPickWriteTool_ClineFunction · 0.85
TestPickWriteTool_CursorFunction · 0.85

Calls 1

pickToolByPriorityFunction · 0.85