handleToolList 处理工具列表请求
(w http.ResponseWriter, r *http.Request)
| 162 | |
| 163 | // handleToolList 处理工具列表请求 |
| 164 | func (s *HTTPBridgeServer) handleToolList(w http.ResponseWriter, r *http.Request) { |
| 165 | if r.Method != http.MethodGet { |
| 166 | http.Error(w, "Method not allowed", http.StatusMethodNotAllowed) |
| 167 | return |
| 168 | } |
| 169 | |
| 170 | tools := s.bridge.ListAvailableTools() |
| 171 | s.sendJSON(w, map[string]any{ |
| 172 | "tools": tools, |
| 173 | }) |
| 174 | } |
| 175 | |
| 176 | // handleToolSchema 处理工具 Schema 请求(带缓存) |
| 177 | func (s *HTTPBridgeServer) handleToolSchema(w http.ResponseWriter, r *http.Request) { |
nothing calls this directly
no test coverage detected