You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(mcp): only register read-only tools in read-only mode
When read_only is enabled, the MCP server no longer registers the
service-mutating tools (create, fork, start, stop, resize,
update_password), so clients never see them and won't attempt them or
prompt for inputs that would only fail. Read tools and db_execute_query
(which connects read-only) stay registered.
A generic addTool wrapper skips registration for tools in
readOnlyGatedTools when the server is read-only; that slice is the single
source of truth, shared with the server instructions. The handler-level
common.CheckReadOnly guards are kept as a backstop for read_only being
toggled on mid-session.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
base:="Tiger MCP provides tools for creating, managing, and querying Tiger Cloud database services (managed TimescaleDB/PostgreSQL). "+
40
-
"Use it to provision and fork services, start/stop/resize instances, rotate credentials, fetch service logs, execute SQL queries, and search Tiger documentation."
48
+
intro:="Tiger MCP provides tools for managing and querying Tiger Cloud database services (managed TimescaleDB/PostgreSQL). "
41
49
42
50
ifcfg==nil||!cfg.ReadOnly {
43
-
returnbase
51
+
returnintro+
52
+
"Use it to provision and fork services, start/stop/resize instances, rotate credentials, fetch service logs, execute SQL queries, and search Tiger documentation."
44
53
}
45
-
returnbase+" "+
46
-
"READ-ONLY MODE IS ENABLED. The following Tiger MCP tools will refuse to run: "+
47
-
strings.Join(readOnlyGatedTools, ", ") +". "+
48
-
"Before asking the user to provide inputs for any of these operations, tell them read-only mode is on."
54
+
// Read-only mode: describe only the registered read tools so the client never
55
+
// learns the service-mutating tools exist.
56
+
returnintro+
57
+
"Use it to list and inspect services, fetch service logs, run read-only SQL queries (writes and DDL are rejected), and search Tiger documentation."
49
58
}
50
59
51
60
// NewServer creates a new Tiger MCP server instance. The caller-supplied cfg
0 commit comments