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
Copy file name to clipboardExpand all lines: internal/cmd/mcp/server.go
+42-20Lines changed: 42 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ type ToolDef struct {
22
22
23
23
// getToolDefinitions returns the list of all available MCP tools
24
24
funcgetToolDefinitions() []ToolDef {
25
+
namingBlurb:=". Two common naming conventions for PlanetScale databases are <org>/<database> and <org>/<database>/<branch>. When the user provides a database identifier in either of these formats, automatically parse and use the org, database, and branch parameters directly - do not perform discovery steps like list_orgs or list_databases. Examples: `acme/widgets` -> org=acme, database=widgets. `acme/widgets/main` -> org=acme, database=widgets, branch=main. If the user provides an identifier like 'org/database' or 'org/database/branch', parse these components directly and skip organizational/database discovery steps."
mcp.Description("The keyspace name (for MySQL) or inner database name (for PostgreSQL)"),
106
112
),
107
113
mcp.WithString("tables",
108
-
mcp.Description("Tables to get schemas for (single name, comma-separated list, or '*' for all tables)"),
114
+
mcp.Description("Tables to get schemas for. MySQL: comma-separated list of table names, or '*' for all tables. PostgreSQL: comma-separated list of simple table names in the public schema, qualified schema.table_names, 'schema.*' for all tables in a schema, or '*' for all tables in all schemas"),
109
115
mcp.Required(),
110
116
),
111
117
mcp.WithString("org",
112
-
mcp.Description("The organization name (uses default organization if not specified)"),
118
+
mcp.Description("The organization name"),
119
+
mcp.Required(),
113
120
),
114
121
),
115
122
handler: HandleGetSchema,
116
123
},
117
124
{
118
125
tool: mcp.NewTool("run_query",
119
-
mcp.WithDescription("Run a SQL query against a database branch keyspace"),
126
+
mcp.WithDescription("Run a SQL query against a database branch keyspace/database"+namingBlurb),
0 commit comments