Skip to content

Commit f04e777

Browse files
committed
add query_table tool back in
1 parent 9b91f42 commit f04e777

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
55
[project]
66
name = "keboola-mcp-server"
77

8-
version = "0.2.1"
8+
version = "0.2.2"
99
description = "MCP server for interacting with Keboola Connection"
1010
readme = "README.md"
1111
requires-python = ">=3.10"

src/keboola_mcp_server/server.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
SessionState,
1414
SessionStateFactory,
1515
)
16-
from keboola_mcp_server.sql_tools import WorkspaceManager
16+
from keboola_mcp_server.sql_tools import WorkspaceManager, add_sql_tools
1717
from keboola_mcp_server.storage_tools import add_storage_tools
1818

1919
logger = logging.getLogger(__name__)
@@ -75,6 +75,7 @@ def create_server(config: Optional[Config] = None) -> FastMCP:
7575
)
7676

7777
add_storage_tools(mcp)
78+
add_sql_tools(mcp)
7879

7980
@mcp.tool()
8081
async def list_components(ctx: Context) -> str:

src/keboola_mcp_server/sql_tools.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from io import StringIO
44
from typing import Annotated, Any, Literal, Mapping, Optional, Sequence
55

6-
from mcp.server.fastmcp import Context
6+
from mcp.server.fastmcp import Context, FastMCP
77
from pydantic import Field, TypeAdapter
88
from pydantic.dataclasses import dataclass
99

@@ -12,6 +12,13 @@
1212
LOG = logging.getLogger(__name__)
1313

1414

15+
def add_sql_tools(mcp: FastMCP) -> None:
16+
"""Add tools to the MCP server."""
17+
mcp.add_tool(query_table)
18+
19+
logger.info("SQL tools added to the MCP server.")
20+
21+
1522
@dataclass(frozen=True)
1623
class TableFqn:
1724
db_name: str

0 commit comments

Comments
 (0)