feat: 新增搜素 API

This commit is contained in:
kaixianzheng
2026-08-20 17:11:15 +08:00
parent ab3a544eec
commit 08bde54d74
3 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
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,
}),
);
}