That's well possible and the main reason the context exists:
(defresource foo [tree leaf]
:exists? (fn [ctx] (if-let [leaf (db-lookup tree leaf)] {::leaf leaf}))
:handle-ok (fn [ctx] (::leaf ctx)))
If you return a map from a decision it's "deep-merged" with the context.
-billy.