diff --git a/pkg/tools/execute/server.go b/pkg/tools/execute/server.go index 0c2c408..fe7a020 100644 --- a/pkg/tools/execute/server.go +++ b/pkg/tools/execute/server.go @@ -287,8 +287,11 @@ func (e *Server) callPromotedTool(ctx context.Context, tool string, args json.Ra var argMap map[string]interface{} if err := json.Unmarshal(args, &argMap); err == nil { if e, ok := argMap["elevated"]; ok { - if b, ok := e.(bool); ok { - elevated = b + switch v := e.(type) { + case bool: + elevated = v + case string: + elevated = v == "true" || v == "1" } // Remove elevated from the args passed to the tool. delete(argMap, "elevated")