Files
koc-loop/app/api/resources/route.ts

13 lines
384 B
TypeScript
Raw Permalink Normal View History

2026-08-20 17:11:15 +08:00
import { resourceSearch } from "../../../lib/mcp-operations";
export async function GET(request: Request) {
const searchParams = new URL(request.url).searchParams;
return Response.json(
await resourceSearch({
query: searchParams.get("q") ?? "",
limit: Number(searchParams.get("limit")) || 50,
offset: Number(searchParams.get("offset")) || 0,
}),
);
}