File tree 2 files changed +15
-11
lines changed
2 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 1
1
[project ]
2
2
name = " mcp_snowflake_server"
3
- version = " 0.2.2 "
3
+ version = " 0.3.0 "
4
4
description = " A simple Snowflake MCP server"
5
5
readme = " README.md"
6
6
requires-python = " >=3.10"
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ async def main(
264
264
),
265
265
Tool (
266
266
name = "read_query" ,
267
- description = "Execute a SELECT query. The tables have the following columns: " + tables_brief ,
267
+ description = "Execute a SELECT query." ,
268
268
input_schema = {
269
269
"type" : "object" ,
270
270
"properties" : {"query" : {"type" : "string" , "description" : "SELECT SQL query to execute" }},
@@ -325,19 +325,23 @@ async def handle_list_resources() -> list[types.Resource]:
325
325
name = "Data Insights Memo" ,
326
326
description = "A living document of discovered data insights" ,
327
327
mimeType = "text/plain" ,
328
- )
328
+ ),
329
+ types .Resource (
330
+ uri = AnyUrl ("context://tables" ),
331
+ name = "Tables" ,
332
+ description = "Description of tables and columns in the database" ,
333
+ mimeType = "text/plain" ,
334
+ ),
329
335
]
330
336
331
337
@server .read_resource ()
332
338
async def handle_read_resource (uri : AnyUrl ) -> str :
333
- if uri .scheme != "memo" :
334
- raise ValueError (f"Unsupported URI scheme: { uri .scheme } " )
335
-
336
- path = str (uri ).replace ("memo://" , "" )
337
- if path != "insights" :
338
- raise ValueError (f"Unknown resource path: { path } " )
339
-
340
- return db .get_memo ()
339
+ if str (uri ) == "memo://insights" :
340
+ return db .get_memo ()
341
+ elif str (uri ) == "context://tables" :
342
+ return tables_brief
343
+ else :
344
+ raise ValueError (f"Unknown resource: { uri } " )
341
345
342
346
@server .list_prompts ()
343
347
async def handle_list_prompts () -> list [types .Prompt ]:
You can’t perform that action at this time.
0 commit comments