Skip to content

Commit ce6e785

Browse files
committed
hints
1 parent 5735adf commit ce6e785

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

server.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import requests
55
from fastmcp import FastMCP
6+
from fastmcp.tools.tool import ToolAnnotations
67
from starlette.responses import Response
78

89
# Set up logging
@@ -61,13 +62,20 @@
6162
- Always suggest further research directions when applicable
6263
"""
6364

65+
ANNOTATIONS = ToolAnnotations(
66+
readOnlyHint=True,
67+
openWorldHint=True,
68+
idempotentHint=True,
69+
destructiveHint=False,
70+
)
71+
6472
mcp = FastMCP(
6573
name="BudgetKey",
6674
instructions=MCP_INSTRUCTIONS,
6775
)
6876

6977

70-
@mcp.tool()
78+
@mcp.tool(annotations=ANNOTATIONS)
7179
def DatasetInfo(dataset: str) -> dict:
7280
"""
7381
Get comprehensive information about a dataset, including its columns and database schema.
@@ -114,7 +122,7 @@ def DatasetInfo(dataset: str) -> dict:
114122
return {"error": str(e)}
115123

116124

117-
@mcp.tool()
125+
@mcp.tool(annotations=ANNOTATIONS)
118126
def DatasetFullTextSearch(dataset: str, q: str) -> dict:
119127
"""
120128
Perform full-text search on a dataset to locate relevant items and identifiers.
@@ -168,7 +176,7 @@ def DatasetFullTextSearch(dataset: str, q: str) -> dict:
168176
return {"error": str(e)}
169177

170178

171-
@mcp.tool()
179+
@mcp.tool(annotations=ANNOTATIONS)
172180
def DatasetDBQuery(dataset: str, query: str, page_size: int = 50) -> dict:
173181
"""
174182
Execute PostgreSQL-compatible SQL queries to obtain comprehensive, precise information from datasets.

0 commit comments

Comments
 (0)