Skip to content

Split mcpserver tool files into focused modules#8

Open
wydrox wants to merge 1 commit into
mainfrom
refactor/mcp-split-tools
Open

Split mcpserver tool files into focused modules#8
wydrox wants to merge 1 commit into
mainfrom
refactor/mcp-split-tools

Conversation

@wydrox

@wydrox wydrox commented Apr 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Break tools_account_session_auth.go (740 lines) into tools_account.go (account tools + consent helpers) and tools_session_auth.go (session/auth tools + shared mcpASA* helpers).
  • Break tools_orders_reservation.go (844 lines) into tools_orders.go (orders tools + orders helpers) and tools_reservation.go (reservation tools + reservation helpers).
  • Update server.go to register tools via registerAccountTools, registerSessionAuthTools, registerOrdersTools, registerReservationTools.
  • Pure code movement. No logic changes. All 30 MCP tools remain registered identically; tools_cart_products.go and helpers_test.go untouched.

Test plan

  • go vet ./... passes
  • go test ./... -race passes
  • go build -o bin/martmart ./cmd/martmart succeeds
  • ./bin/martmart --help and ./bin/martmart config show work
  • MCP smoke: initialize + tools/list returns all 30 tools (including session_login, reservation_slots, cart_add, account_profile, orders_list)

Break tools_account_session_auth.go (740 lines) into tools_account.go
(account tools + consent helpers) and tools_session_auth.go (session and
auth tools plus shared mcpASA* helpers). Break tools_orders_reservation.go
(844 lines) into tools_orders.go (orders tools + orders helpers) and
tools_reservation.go (reservation tools + reservation helpers).

Update server.go to call registerAccountTools, registerSessionAuthTools,
registerOrdersTools, and registerReservationTools. No logic changes; all
30 MCP tools remain registered identically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant