Skip to content

feat: add gCTS tools for git-enabled CTS#41

Open
Prolls wants to merge 2 commits intooisee:mainfrom
Prolls:feature/gcts-tools
Open

feat: add gCTS tools for git-enabled CTS#41
Prolls wants to merge 2 commits intooisee:mainfrom
Prolls:feature/gcts-tools

Conversation

@Prolls
Copy link

@Prolls Prolls commented Mar 1, 2026

Summary

  • Add 10 gCTS tools for managing git-enabled Change Transport System repositories on SAP
  • New files: pkg/adt/gcts.go (ADT client), internal/mcp/handlers_gcts.go (MCP handlers), pkg/adt/gcts_test.go (11 unit tests)
  • Modified internal/mcp/server.go: tool group "GC", 4 read-only tools in focused mode, all 10 in expert mode

Tools

Tool Mode Description
GctsListRepositories focused List all gCTS repositories
GctsGetRepository focused Get repository details + config
GctsListBranches focused List branches
GctsGetHistory focused Get commit history
GctsCreateRepository expert Create a new repository
GctsDeleteRepository expert Delete a repository
GctsCloneRepository expert Clone repository on SAP
GctsPull expert Pull changes (by commit)
GctsCommit expert Create a commit
GctsSwitchBranch expert Switch active branch

Test plan

  • go build ./... passes
  • go test ./... passes (11 new gCTS tests)
  • go vet ./... clean

Closes #39

🤖 Generated with Claude Code

Prolls and others added 2 commits March 1, 2026 11:38
Implement 10 gCTS tools for managing git-enabled repositories on SAP:
- GctsListRepositories, GctsGetRepository (read)
- GctsCreateRepository, GctsDeleteRepository (write)
- GctsCloneRepository, GctsPull, GctsCommit (write)
- GctsListBranches, GctsSwitchBranch, GctsGetHistory (read/write)

All tools use JSON API on /sap/bc/cts_abapvcs with proper error handling
for gCTS errorLog responses. Read-only tools available in focused mode,
all 10 in expert mode. Tool group "GC" for selective disablement.

Closes oisee#39

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use func-based mock (gctsTestMock) that returns fresh responses
  for each call, avoiding exhausted Body readers
- Enable transports in test config (Safety.EnableTransports = true)
- Use http.Header.Set() instead of map literal init to ensure
  canonical header keys (X-Csrf-Token vs X-CSRF-Token)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

[Feature Request] Add gCTS (git-enabled Change and Transport System) tools

1 participant