MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _init_session

Function _init_session

tests/test_serve_http.py:190–195  ·  view source on GitHub ↗
(client)

Source from the content-addressed store, hash-verified

188
189
190def _init_session(client) -> dict:
191 init = client.post("/mcp", headers=_MCP_HEADERS, json=_INIT_BODY)
192 assert init.status_code == 200
193 headers = {**_MCP_HEADERS, "mcp-session-id": init.headers.get("mcp-session-id")}
194 client.post("/mcp", headers=headers, json={"jsonrpc": "2.0", "method": "notifications/initialized"})
195 return headers
196
197
198def _call_tool(client, headers, name, arguments, rid) -> str:

Calls 2

postMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected