Skip to content

Commit 83c8954

Browse files
authored
Merge branch 'main' into murrayju/env-output
2 parents 938032d + 3ef0b28 commit 83c8954

File tree

11 files changed

+100
-96
lines changed

11 files changed

+100
-96
lines changed

CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Tiger CLI is a Go-based command-line interface for managing Tiger, the modern da
150150
- **Command Structure**: `internal/tiger/cmd/` - Cobra-based command definitions
151151
- `root.go` - Root command with global flags and configuration initialization
152152
- `auth.go` - Authentication commands (login, logout, whoami)
153-
- `service.go` - Service management commands (list, create, describe, fork, delete, update-password)
153+
- `service.go` - Service management commands (list, create, get, fork, delete, update-password)
154154
- `db.go` - Database operation commands (connection-string, connect, test-connection)
155155
- `config.go` - Configuration management commands (show, set, unset, reset)
156156
- `mcp.go` - MCP server commands (install, start)
@@ -160,7 +160,7 @@ Tiger CLI is a Go-based command-line interface for managing Tiger, the modern da
160160
- **API Client**: `internal/tiger/api/` - Generated OpenAPI client with mocks
161161
- **MCP Server**: `internal/tiger/mcp/` - Model Context Protocol server implementation
162162
- `server.go` - MCP server initialization, tool registration, and lifecycle management
163-
- `service_tools.go` - Service management tools (list, show, create, update-password)
163+
- `service_tools.go` - Service management tools (list, get, create, update-password)
164164
- `db_tools.go` - Database operation tools (execute-query)
165165
- `proxy.go` - Proxy client that forwards tools/resources/prompts from remote docs MCP server
166166
- **Password Storage**: `internal/tiger/password/` - Secure password storage utilities
@@ -193,7 +193,7 @@ The Tiger MCP server provides AI assistants with programmatic access to Tiger re
193193
**Two Types of Tools:**
194194

195195
1. **Direct Tiger Tools** - Native tools for Tiger operations
196-
- `service_tools.go` - Service management (list, show, create, update-password)
196+
- `service_tools.go` - Service management (list, get, create, update-password)
197197
- `db_tools.go` - Database operations (execute-query)
198198
2. **Proxied Documentation Tools** (`proxy.go`) - Tools forwarded from a remote docs MCP server (see `proxy.go` for implementation)
199199

@@ -380,7 +380,7 @@ buildRootCmd() → Complete CLI with all commands and flags
380380
│ └── buildWhoamiCmd()
381381
├── buildServiceCmd()
382382
│ ├── buildServiceListCmd()
383-
│ ├── buildServiceDescribeCmd()
383+
│ ├── buildServiceGetCmd()
384384
│ ├── buildServiceCreateCmd()
385385
│ ├── buildServiceForkCmd()
386386
│ ├── buildServiceDeleteCmd()

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Tiger CLI provides the following commands:
8484
- `tiger service` - Service lifecycle management
8585
- `list` - List all services
8686
- `create` - Create a new service
87-
- `describe` - Show detailed service information
87+
- `get` - Show detailed service information (aliases: `describe`, `show`)
8888
- `fork` - Fork an existing service
8989
- `delete` - Delete a service
9090
- `update-password` - Update service master password
@@ -162,7 +162,7 @@ The MCP server exposes the following tools to AI assistants:
162162

163163
**Service Management:**
164164
- `service_list` - List all database services in your project
165-
- `service_show` - Show detailed information about a specific service
165+
- `service_get` - Get detailed information about a specific service
166166
- `service_create` - Create new database services with configurable resources
167167
- `service_update_password` - Update the master password for a service
168168

docs/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ go test ./internal/tiger/cmd -v -run Integration
8888
### What Integration Tests Cover
8989

9090
- **Authentication lifecycle**: Login with credentials, verify authentication, logout
91-
- **Service management**: Create, list, describe, and delete database services
91+
- **Service management**: Create, list, get, and delete database services
9292
- **Password management**: Update service passwords with keychain storage
9393
- **Database connectivity**: Generate connection strings and execute psql commands
9494
- **Output formats**: Validate JSON, YAML, and table output formats

docs/mcp_feedback.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The TigerData MCP tools provide useful database management functionality but hav
1212
### Recommendations
1313
- **WHY**: Consistency reduces cognitive load and makes the API more predictable
1414
- Standardize on snake_case throughout: `get_guide`, `semantic_search_postgres_docs`
15-
- Use consistent verbs: `service_get` instead of `service_show` for alignment with REST conventions
15+
- ~~Use consistent verbs: `service_get` instead of `service_show` for alignment with REST conventions~~ ✅ COMPLETED
1616

1717
## Input Parameters
1818

@@ -99,6 +99,7 @@ The TigerData MCP tools provide useful database management functionality but hav
9999
### High Priority
100100
1. Fix parameter type issues in `semanticSearchPostgresDocs`
101101
2. Standardize naming conventions across all tools
102+
- ~~service_get~~ ✅ COMPLETED
102103
3. Add service deletion capability
103104
4. ~~Rename timeout to timeout_minutes~~ ✅ COMPLETED
104105

@@ -125,4 +126,4 @@ The TigerData MCP tools provide useful database management functionality but hav
125126
2. **Reliability**: Proper typing prevents runtime failures
126127
3. **Usability**: Clear documentation reduces trial-and-error
127128
4. **Completeness**: Full CRUD operations enable real workflows
128-
5. **Efficiency**: Appropriate content sizing preserves LLM context
129+
5. **Efficiency**: Appropriate content sizing preserves LLM context

internal/tiger/cmd/integration_test.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func executeIntegrationCommand(args ...string) (string, error) {
8181
}
8282

8383
// TestServiceLifecycleIntegration tests the complete authentication and service lifecycle:
84-
// login -> whoami -> create -> describe -> update-password -> delete -> logout
84+
// login -> whoami -> create -> get -> update-password -> delete -> logout
8585
func TestServiceLifecycleIntegration(t *testing.T) {
8686
config.SetTestServiceName(t)
8787
// Check for required environment variables
@@ -215,22 +215,22 @@ func TestServiceLifecycleIntegration(t *testing.T) {
215215
}
216216
})
217217

218-
t.Run("DescribeService", func(t *testing.T) {
218+
t.Run("GetService", func(t *testing.T) {
219219
if serviceID == "" {
220220
t.Skip("No service ID available from create test")
221221
}
222222

223-
t.Logf("Describing service: %s", serviceID)
223+
t.Logf("Getting service details: %s", serviceID)
224224

225225
output, err := executeIntegrationCommand(
226-
"service", "describe", serviceID,
226+
"service", "get", serviceID,
227227
"--output", "json",
228228
)
229229

230-
t.Logf("Raw service describe output: %s", output)
230+
t.Logf("Raw service get output: %s", output)
231231

232232
if err != nil {
233-
t.Fatalf("Service describe failed: %v\nOutput: %s", err, output)
233+
t.Fatalf("Service get failed: %v\nOutput: %s", err, output)
234234
}
235235

236236
// Parse JSON to verify service details
@@ -389,14 +389,14 @@ func TestServiceLifecycleIntegration(t *testing.T) {
389389

390390
t.Logf("Verifying service %s no longer exists", deletedServiceID)
391391

392-
// Try to describe the deleted service - should fail
392+
// Try to get the deleted service - should fail
393393
output, err := executeIntegrationCommand(
394-
"service", "describe", deletedServiceID,
394+
"service", "get", deletedServiceID,
395395
)
396396

397397
// We expect this to fail since the service should be deleted
398398
if err == nil {
399-
t.Errorf("Expected service describe to fail for deleted service, but got output: %s", output)
399+
t.Errorf("Expected service get to fail for deleted service, but got output: %s", output)
400400
}
401401

402402
// Check that error indicates service not found
@@ -533,8 +533,8 @@ func TestServiceNotFound(t *testing.T) {
533533
reason string
534534
}{
535535
{
536-
name: "service describe",
537-
args: []string{"service", "describe", nonExistentServiceID},
536+
name: "service get",
537+
args: []string{"service", "get", nonExistentServiceID},
538538
expectedExitCode: ExitServiceNotFound,
539539
},
540540
{
@@ -707,8 +707,8 @@ func TestAuthenticationErrorsIntegration(t *testing.T) {
707707
args: []string{"service", "list", "--project-id", projectID},
708708
},
709709
{
710-
name: "service describe",
711-
args: []string{"service", "describe", "non-existent-service", "--project-id", projectID},
710+
name: "service get",
711+
args: []string{"service", "get", "non-existent-service", "--project-id", projectID},
712712
},
713713
{
714714
name: "service create",

internal/tiger/cmd/service.go

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func buildServiceCmd() *cobra.Command {
3434
}
3535

3636
// Add all subcommands
37-
cmd.AddCommand(buildServiceDescribeCmd())
37+
cmd.AddCommand(buildServiceGetCmd())
3838
cmd.AddCommand(buildServiceListCmd())
3939
cmd.AddCommand(buildServiceCreateCmd())
4040
cmd.AddCommand(buildServiceDeleteCmd())
@@ -44,32 +44,33 @@ func buildServiceCmd() *cobra.Command {
4444
return cmd
4545
}
4646

47-
// serviceDescribeCmd represents the describe command under service
48-
func buildServiceDescribeCmd() *cobra.Command {
47+
// buildServiceGetCmd represents the get command under service
48+
func buildServiceGetCmd() *cobra.Command {
4949
var withPassword bool
5050
var output string
5151

5252
cmd := &cobra.Command{
53-
Use: "describe [service-id]",
54-
Short: "Show detailed information about a service",
53+
Use: "get [service-id]",
54+
Aliases: []string{"describe", "show"},
55+
Short: "Show detailed information about a service",
5556
Long: `Show detailed information about a specific database service.
5657
5758
The service ID can be provided as an argument or will use the default service
5859
from your configuration. This command displays comprehensive information about
5960
the service including configuration, status, endpoints, and resource usage.
6061
6162
Examples:
62-
# Describe default service
63-
tiger service describe
63+
# Get default service details
64+
tiger service get
6465
65-
# Describe specific service
66-
tiger service describe svc-12345
66+
# Get specific service details
67+
tiger service get svc-12345
6768
6869
# Get service details in JSON format
69-
tiger service describe svc-12345 --output json
70+
tiger service get svc-12345 --output json
7071
7172
# Get service details in YAML format
72-
tiger service describe svc-12345 --output yaml`,
73+
tiger service get svc-12345 --output yaml`,
7374
RunE: func(cmd *cobra.Command, args []string) error {
7475
// Get config
7576
cfg, err := config.Load()

internal/tiger/cmd/service_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ func TestAutoGeneratedServiceName(t *testing.T) {
558558
}
559559
}
560560

561-
func TestServiceDescribe_NoServiceID(t *testing.T) {
561+
func TestServiceGet_NoServiceID(t *testing.T) {
562562
tmpDir := setupServiceTest(t)
563563

564564
// Set up config with project ID but no default service ID
@@ -577,8 +577,8 @@ func TestServiceDescribe_NoServiceID(t *testing.T) {
577577
}
578578
defer func() { getAPIKeyForService = originalGetAPIKey }()
579579

580-
// Execute service describe command without service ID
581-
_, err, _ = executeServiceCommand("service", "describe")
580+
// Execute service get command without service ID
581+
_, err, _ = executeServiceCommand("service", "get")
582582
if err == nil {
583583
t.Fatal("Expected error when no service ID is provided or configured")
584584
}
@@ -588,7 +588,7 @@ func TestServiceDescribe_NoServiceID(t *testing.T) {
588588
}
589589
}
590590

591-
func TestServiceDescribe_NoAuth(t *testing.T) {
591+
func TestServiceGet_NoAuth(t *testing.T) {
592592
tmpDir := setupServiceTest(t)
593593

594594
// Set up config with project ID and service ID
@@ -608,8 +608,8 @@ func TestServiceDescribe_NoAuth(t *testing.T) {
608608
}
609609
defer func() { getAPIKeyForService = originalGetAPIKey }()
610610

611-
// Execute service describe command
612-
_, err, _ = executeServiceCommand("service", "describe")
611+
// Execute service get command
612+
_, err, _ = executeServiceCommand("service", "get")
613613
if err == nil {
614614
t.Fatal("Expected error when not authenticated")
615615
}

internal/tiger/mcp/service_tools.go

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -79,24 +79,24 @@ func setServiceIDSchemaProperties(schema *jsonschema.Schema) {
7979
schema.Properties["service_id"].Pattern = "^[a-z0-9]{10}$"
8080
}
8181

82-
// ServiceShowInput represents input for service_show
83-
type ServiceShowInput struct {
82+
// ServiceGetInput represents input for service_get
83+
type ServiceGetInput struct {
8484
ServiceID string `json:"service_id"`
8585
}
8686

87-
func (ServiceShowInput) Schema() *jsonschema.Schema {
88-
schema := util.Must(jsonschema.For[ServiceShowInput](nil))
87+
func (ServiceGetInput) Schema() *jsonschema.Schema {
88+
schema := util.Must(jsonschema.For[ServiceGetInput](nil))
8989
setServiceIDSchemaProperties(schema)
9090
return schema
9191
}
9292

93-
// ServiceShowOutput represents output for service_show
94-
type ServiceShowOutput struct {
93+
// ServiceGetOutput represents output for service_get
94+
type ServiceGetOutput struct {
9595
Service ServiceDetail `json:"service"`
9696
}
9797

98-
func (ServiceShowOutput) Schema() *jsonschema.Schema {
99-
return util.Must(jsonschema.For[ServiceShowOutput](nil))
98+
func (ServiceGetOutput) Schema() *jsonschema.Schema {
99+
return util.Must(jsonschema.For[ServiceGetOutput](nil))
100100
}
101101

102102
// ServiceDetail represents detailed service information
@@ -231,19 +231,19 @@ func (s *Server) registerServiceTools() {
231231
},
232232
}, s.handleServiceList)
233233

234-
// service_show
234+
// service_get
235235
mcp.AddTool(s.mcpServer, &mcp.Tool{
236-
Name: "service_show",
237-
Title: "Show Service Details",
236+
Name: "service_get",
237+
Title: "Get Service Details",
238238
Description: "Get detailed information for a specific database service. " +
239239
"Returns connection endpoints, replica configuration, resource allocation, creation time, and status.",
240-
InputSchema: ServiceShowInput{}.Schema(),
241-
OutputSchema: ServiceShowOutput{}.Schema(),
240+
InputSchema: ServiceGetInput{}.Schema(),
241+
OutputSchema: ServiceGetOutput{}.Schema(),
242242
Annotations: &mcp.ToolAnnotations{
243243
ReadOnlyHint: true,
244-
Title: "Show Service Details",
244+
Title: "Get Service Details",
245245
},
246-
}, s.handleServiceShow)
246+
}, s.handleServiceGet)
247247

248248
// service_create
249249
mcp.AddTool(s.mcpServer, &mcp.Tool{
@@ -327,21 +327,21 @@ func (s *Server) handleServiceList(ctx context.Context, req *mcp.CallToolRequest
327327
return nil, output, nil
328328
}
329329

330-
// handleServiceShow handles the service_show MCP tool
331-
func (s *Server) handleServiceShow(ctx context.Context, req *mcp.CallToolRequest, input ServiceShowInput) (*mcp.CallToolResult, ServiceShowOutput, error) {
330+
// handleServiceGet handles the service_get MCP tool
331+
func (s *Server) handleServiceGet(ctx context.Context, req *mcp.CallToolRequest, input ServiceGetInput) (*mcp.CallToolResult, ServiceGetOutput, error) {
332332
// Load config and validate project ID
333333
cfg, err := s.loadConfigWithProjectID()
334334
if err != nil {
335-
return nil, ServiceShowOutput{}, err
335+
return nil, ServiceGetOutput{}, err
336336
}
337337

338338
// Create fresh API client with current credentials
339339
apiClient, err := s.createAPIClient()
340340
if err != nil {
341-
return nil, ServiceShowOutput{}, err
341+
return nil, ServiceGetOutput{}, err
342342
}
343343

344-
logging.Debug("MCP: Showing service details",
344+
logging.Debug("MCP: Getting service details",
345345
zap.String("project_id", cfg.ProjectID),
346346
zap.String("service_id", input.ServiceID))
347347

@@ -351,16 +351,16 @@ func (s *Server) handleServiceShow(ctx context.Context, req *mcp.CallToolRequest
351351

352352
resp, err := apiClient.GetProjectsProjectIdServicesServiceIdWithResponse(ctx, cfg.ProjectID, input.ServiceID)
353353
if err != nil {
354-
return nil, ServiceShowOutput{}, fmt.Errorf("failed to get service details: %w", err)
354+
return nil, ServiceGetOutput{}, fmt.Errorf("failed to get service details: %w", err)
355355
}
356356

357357
// Handle API response
358358
if resp.StatusCode() != 200 {
359-
return nil, ServiceShowOutput{}, resp.JSON4XX
359+
return nil, ServiceGetOutput{}, resp.JSON4XX
360360
}
361361

362362
service := *resp.JSON200
363-
output := ServiceShowOutput{
363+
output := ServiceGetOutput{
364364
Service: s.convertToServiceDetail(service),
365365
}
366366

0 commit comments

Comments
 (0)