feat(mcp): load mcp tool defintions on demand by burmudar · Pull Request #1231 · sourcegraph/src-cli

Removes the tool list json dump we had and now loads the tool definitions on demand from the the configured sourcegraph instance.

Note there are still rough edges:

  • src mcp panics with no subcommands
  • error messages need work to inform the llm of corrective steps it can take or discovery
  • pass args as json with --json
  • flag validation ... if it aint set don't use it

Test plan

tested locally

go run ./cmd/src mcp list-tools
go run ./cmd/src mcp read-file schema
go run ./cmd/src mcp commit-search -repo 'sourcegraph/sourcegraph' -count 5