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

Function POST

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

Source from the content-addressed store, hash-verified

27}
28
29export async function POST(request: Request) {
30 try {
31 const session = await requireSession(request)
32 const body = (await request.json()) as CreateAgentInput
33 return Response.json(await createCloudAgent(session.apiKey, body))
34 } catch (error) {
35 return jsonError(error, "Failed to create a cloud agent.")
36 }
37}

Callers

nothing calls this directly

Calls 3

requireSessionFunction · 0.90
createCloudAgentFunction · 0.90
jsonErrorFunction · 0.90

Tested by

no test coverage detected