MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / execute_query

Function execute_query

src/codegraphcontext/api/router.py:123–141  ·  view source on GitHub ↗
(
    request: QueryRequest,
    server: MCPServer = Depends(get_server)
)

Source from the content-addressed store, hash-verified

121
122@router.post("/query", response_model=ApiResponse)
123async def execute_query(
124 request: QueryRequest,
125 server: MCPServer = Depends(get_server)
126):
127 try:
128 result = await server.handle_tool_call(
129 "execute_cypher_query",
130 {
131 "cypher_query": request.query,
132 "params": request.params,
133 },
134 )
135 except (OSError, socket.error) as exc:
136 raise_service_unavailable(exc)
137
138 if "error" in result:
139 return ApiResponse(status="error", error=result["error"])
140
141 return ApiResponse(status="ok", data=result)
142
143@router.get("/repositories", response_model=ApiResponse)
144async def list_repositories(

Callers

nothing calls this directly

Calls 3

ApiResponseClass · 0.85
handle_tool_callMethod · 0.45

Tested by

no test coverage detected