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

Function execute_query

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

ApiResponseClass · 0.85
handle_tool_callMethod · 0.45

Tested by

no test coverage detected