add mcp fix
This commit is contained in:
@@ -66,8 +66,9 @@ class GraylogMcpClient:
|
||||
credentials = base64.b64encode(f"{value}:token".encode("utf-8")).decode("ascii")
|
||||
return f"Basic {credentials}"
|
||||
|
||||
def probe(self) -> dict[str, object]:
|
||||
self.session_id = None
|
||||
def probe(self, *, force_new_session: bool = False) -> dict[str, object]:
|
||||
if force_new_session:
|
||||
self.session_id = None
|
||||
initialized = self._call(
|
||||
"initialize",
|
||||
{"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "fgAI", "version": "0.1"}},
|
||||
@@ -90,7 +91,7 @@ class GraylogMcpClient:
|
||||
except RuntimeError as exc:
|
||||
if not self._should_reconnect(str(exc)):
|
||||
raise
|
||||
self.probe()
|
||||
self.probe(force_new_session=True)
|
||||
return self._call("tools/call", {"name": name, "arguments": arguments})
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user