import { getCache, setCache } from "#server/utils/context"; import { listTools } from "../../service/tool"; export default defineWrappedResponseHandler(async () => { const cacheKey = "tools:list"; const cached = await getCache(cacheKey); if (cached) return R.success(cached); const tools = await listTools(); await setCache(cacheKey, tools, 300); return R.success(tools); });