We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c8f404 commit 9c53599Copy full SHA for 9c53599
cratedb_mcp/__main__.py
@@ -14,9 +14,12 @@
14
15
16
def query_cratedb(query: str) -> list[dict]:
17
- return httpx.post(
18
- f"{HTTP_URL}/_sql", json={"stmt": query}, timeout=Settings.http_timeout()
19
- ).json()
+ """Sends a `query` to the set `$CRATEDB_CLUSTER_URL`"""
+ url = HTTP_URL
+ if url.endswith("/"):
20
+ url = url.removesuffix("/")
21
+
22
+ return httpx.post(f"{url}/_sql", json={"stmt": query}, timeout=Settings.http_timeout()).json()
23
24
25
@mcp.tool(
0 commit comments