Skip to content

Commit 05c97aa

Browse files
committed
rm get ws tool
1 parent 5f416a4 commit 05c97aa

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

internal/mcp/tools.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ func addServerTools(srv *server.MCPServer) {
1818
)
1919
srv.AddTool(listWorkspaces, listWorkspacesHandler)
2020

21-
getWorkspace := mcp.NewTool("get_workspace",
22-
mcp.WithString("workspace_name", mcp.Required(), mcp.Description("Registered workspace name")),
23-
mcp.WithDescription("Get details about a registered flow workspaces"),
24-
)
25-
srv.AddTool(getWorkspace, getWorkspaceHandler)
26-
2721
listExecutables := mcp.NewTool("list_executables",
2822
mcp.WithDescription("List executables in a workspace"),
2923
mcp.WithString("workspace", mcp.Description("Workspace name (optional)")),
@@ -67,21 +61,6 @@ func listWorkspacesHandler(_ context.Context, _ mcp.CallToolRequest) (*mcp.CallT
6761
return mcp.NewToolResultText(string(output)), nil
6862
}
6963

70-
func getWorkspaceHandler(_ context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
71-
wsName, err := request.RequireString("workspace_name")
72-
if err != nil {
73-
return mcp.NewToolResultError("workspace_name is required"), nil
74-
}
75-
76-
cmd := exec.Command("flow", "workspace", "get", wsName, "--output", "json")
77-
output, err := cmd.CombinedOutput()
78-
if err != nil {
79-
return mcp.NewToolResultError(fmt.Sprintf("Failed to get workspaces %s: %s", wsName, output)), nil
80-
}
81-
82-
return mcp.NewToolResultText(string(output)), nil
83-
}
84-
8564
func listExecutablesHandler(_ context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
8665
wsFilter := request.GetString("workspace", executable.WildcardWorkspace)
8766
nsFilter := request.GetString("namespace", executable.WildcardNamespace)

0 commit comments

Comments
 (0)