@@ -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