Skip to content

Commit 897aae6

Browse files
authored
Merge branch 'wb/mcp-list-tools' into wb/mcp-flagset-inputschema
2 parents 700a6cb + be73930 commit 897aae6

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

cmd/src/mcp.go

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,22 @@
11
package main
22

33
import (
4-
"context"
5-
"encoding/json"
64
"flag"
75
"fmt"
8-
"os"
9-
"strings"
106

11-
"github.com/sourcegraph/src-cli/internal/api"
127
"github.com/sourcegraph/src-cli/internal/mcp"
13-
14-
"github.com/sourcegraph/sourcegraph/lib/errors"
158
)
169

1710
func init() {
18-
if os.Getenv("SRC_EXPERIMENT_MCP") == "true" {
19-
flagSet := flag.NewFlagSet("mcp", flag.ExitOnError)
20-
commands = append(commands, &command{
21-
flagSet: flagSet,
22-
handler: mcpMain,
23-
})
24-
}
11+
flagSet := flag.NewFlagSet("mcp", flag.ExitOnError)
12+
commands = append(commands, &command{
13+
flagSet: flagSet,
14+
handler: mcpMain,
15+
})
2516
}
2617
func mcpMain(args []string) error {
2718
fmt.Println("NOTE: This command is still experimental")
28-
tools, err := mcp.LoadDefaultToolDefinitions()
19+
tools, err := mcp.LoadToolDefinitions()
2920
if err != nil {
3021
return err
3122
}

0 commit comments

Comments
 (0)