MCPcopy
hub / github.com/cursor/cookbook / GET

Function GET

sdk/agent-kanban/src/app/api/agents/route.ts:12–27  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

10export const dynamic = "force-dynamic"
11
12export async function GET(request: Request) {
13 try {
14 const session = await requireSession(request)
15 const url = new URL(request.url)
16
17 return Response.json(
18 await listCloudAgents(session.apiKey, {
19 cursor: url.searchParams.get("cursor") ?? undefined,
20 prUrl: url.searchParams.get("prUrl") ?? undefined,
21 includeArchived: url.searchParams.get("includeArchived") === "true",
22 })
23 )
24 } catch (error) {
25 return jsonError(error, "Failed to list cloud agents.")
26 }
27}
28
29export async function POST(request: Request) {
30 try {

Callers

nothing calls this directly

Calls 3

requireSessionFunction · 0.90
listCloudAgentsFunction · 0.90
jsonErrorFunction · 0.90

Tested by

no test coverage detected