Skip to content

Commit 212fc1c

Browse files
Adding --enable-search
1 parent b6fbb52 commit 212fc1c

6 files changed

Lines changed: 31 additions & 13 deletions

File tree

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,13 @@ architecture-beta
5454
The MCP server runs locally on the machine that runs the LLM frontend (eg Claude). The installation steps are simple
5555

5656
1. Clone or download this repository.
57-
2. Install the [uv](https://docs.astral.sh/uv/guides/install-python/) package manager (note that the MCP server requires python 3.11 or later)
58-
3. Do a sanity check by running the command and validating the output as shown below.
57+
2. Install the [uv](https://docs.astral.sh/uv/getting-started/installation/) package manager (note that the MCP server requires python 3.11 or later)
58+
- If you install this for the first time, restart your terminal at the end of the install
59+
3. Ensure that you have python installed by running the command below. It should show python 3.11 or later (If you don't have python installed, follow the instructions [here](https://docs.astral.sh/uv/guides/install-python/) OR simply run `uv python install`)
60+
```shell
61+
$ uv python find
62+
```
63+
4. Do a sanity check by running the command and validating the output as shown below.
5964

6065
```shell
6166
# cd <toplevel git dir> or add `--directory <toplevel git dir>`
@@ -152,7 +157,7 @@ Default config file: '/Users/..../Library/Application Support/Claude/claude_desk
152157
$ uv run dremio-mcp-server config list --type dremioai
153158
Default config file: /Users/..../.config/dremioai/config.yaml (exists = True)
154159
dremio:
155-
enable_experimental: false
160+
enable_search: false
156161
pat: ....
157162
uri: ....
158163
tools:
@@ -181,7 +186,7 @@ dremio:
181186
uri: https://.... # the Dremio URI
182187
pat: "@~/ws/tokens/idl.token" # PAT can be put in a file and used here with @ prefix
183188
project_id: <string> Project ID required for Dremio Cloud
184-
enable_experimental: <bool> # Optional: Enable experimental features
189+
enable_search: <bool> # Optional: Enable semantic search
185190
allow_dml: <bool> # Optional: Allow MCP Server to create views in Dremio
186191
tools:
187192
server_mode: FOR_DATA_PATTERNS # the serverm

docs/settings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dremio:
5454
uri: <string|DremioCloudUri> # Dremio instance URI
5555
pat: <string> # Personal Access Token
5656
project_id: <string> # Optional: Project ID for Dremio Cloud
57-
enable_experimental: <bool> # Optional: Enable experimental features
57+
enable_search: <bool> # Optional: Enable semantic search
5858
allow_dml: <bool> # Optional: Allow MCP Server to create views in Dremio
5959
```
6060
@@ -145,7 +145,7 @@ dremio:
145145
uri: "https://api.dremio.cloud"
146146
pat: "@~/tokens/dremio.pat"
147147
project_id: "project123" # required only for DC
148-
enable_experimental: <bool> # Optional: Enable experimental features
148+
enable_search: <bool> # Optional: Enable semantic search features
149149
allow_dml: <bool> # Optional: Allow MCP Server to create views in Dremio
150150
tools:
151151
server_mode: "FOR_SELF,FOR_DATA_PATTERNS"

src/dremioai/config/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ class Dremio(BaseModel):
121121
]
122122
raw_pat: Optional[str] = Field(default=None, alias="pat")
123123
project_id: Optional[str] = None
124-
enable_experimental: Optional[bool] = Field(
124+
enable_search: Optional[bool] = Field(
125125
default=False,
126-
alias=AliasChoices("enable_experimental", "enable_search"),
126+
alias=AliasChoices("enable_search", "enable_experimental"),
127127
description="enable experimental tools",
128128
)
129129
oauth2: Optional[OAuth2] = None

src/dremioai/servers/mcp.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,7 @@ def create_default_config(
281281
Optional[List[str]],
282282
Option("-m", "--mode", help="MCP server mode", click_type=Choice(_mode())),
283283
] = [tools.ToolType.FOR_DATA_PATTERNS.name],
284-
enable_experimental: Annotated[
285-
bool, Option(help="Enable experimental features")
286-
] = False,
284+
enable_search: Annotated[bool, Option(help="Enable semantic search")] = False,
287285
oauth_client_id: Annotated[
288286
Optional[str],
289287
Option(help="The ID of OAuth application, for OAuth2 logon support"),
@@ -298,7 +296,7 @@ def create_default_config(
298296
"uri": uri,
299297
"pat": pat,
300298
"project_id": project_id,
301-
"enable_experimental": enable_experimental,
299+
"enable_search": enable_search,
302300
"oauth": (
303301
settings.OAuth2.model_validate({"client_id": oauth_client_id})
304302
if oauth_client_id

src/dremioai/tools/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def is_tool_for(
152152
return False
153153

154154
if (For := get_for(tool)) is not None:
155-
if For & ToolType.EXPERIMENTAL and not dremio.enable_experimental:
155+
if For & ToolType.EXPERIMENTAL and not dremio.enable_search:
156156
return False
157157
return (For & tool_type) != 0 # == tool_type
158158
return False

tests/config/test_settings.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,18 @@ def test_create_default_config(mock_config_dir):
9696
)
9797
tools = settings.instance().tools
9898
assert tools.server_mode == mode
99+
100+
101+
@pytest.mark.parametrize(
102+
"name,value",
103+
[
104+
(name, value)
105+
for name in ("enable_search", "enable_experimental")
106+
for value in (True, False)
107+
],
108+
)
109+
def test_experimental_rename(name: str, value: bool):
110+
d = settings.Dremio.model_validate(
111+
{name: value, "uri": "https://foo", "pat": "bar"}
112+
)
113+
assert d.enable_search == value

0 commit comments

Comments
 (0)