13 lines
384 B
TypeScript
13 lines
384 B
TypeScript
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,
|
|
}),
|
|
);
|
|
}
|