Skip to content

Commit ed9060b

Browse files
committed
fix: remove "get-service-entries"
1 parent 822bb57 commit ed9060b

File tree

4 files changed

+2
-45
lines changed

4 files changed

+2
-45
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,8 @@ extensions:
153153
## 🛠️ Available Tools
154154

155155
### 🌐 Networking Resources
156-
- `get-virtual-services` - List Virtual Services in a namespace
157-
- `get-destination-rules` - List Destination Rules in a namespace
158-
- `get-service-entries` - List Service Entries in a namespace
156+
- `get-virtual-service` - Get a specific Virtual Service configuration by name
157+
- `get-destination-rule` - Get a specific Destination Rule configuration by name
159158

160159

161160
### ⚙️ Configuration Resources

pkg/istio/istio.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -171,25 +171,6 @@ func (i *Istio) GetDestinationRule(ctx context.Context, namespace string, drName
171171
return result, nil
172172
}
173173

174-
func (i *Istio) GetServiceEntries(ctx context.Context, namespace string) (string, error) {
175-
seList, err := i.istioClient.NetworkingV1alpha3().ServiceEntries(namespace).List(ctx, metav1.ListOptions{})
176-
if err != nil {
177-
return "", fmt.Errorf("failed to list service entries: %w", err)
178-
}
179-
180-
result := fmt.Sprintf("Found %d Service Entries in namespace '%s':\n", len(seList.Items), namespace)
181-
for _, se := range seList.Items {
182-
result += fmt.Sprintf("- %s\n", se.Name)
183-
if se.Spec.Hosts != nil {
184-
result += fmt.Sprintf(" Hosts: %v\n", se.Spec.Hosts)
185-
}
186-
if se.Spec.Location.String() != "" {
187-
result += fmt.Sprintf(" Location: %s\n", se.Spec.Location.String())
188-
}
189-
}
190-
return result, nil
191-
}
192-
193174
// Configuration resources
194175

195176
// CheckExternalDependencyAvailability checks if an external dependency is properly configured and accessible for a service

pkg/mcp/profile.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,6 @@ func (s *Server) initNetworkingTools() []server.ServerTool {
9292
),
9393
Handler: s.getDestinationRule,
9494
},
95-
{
96-
Tool: mcp.NewTool("get-service-entries",
97-
mcp.WithDescription("Get Istio Service Entries from any namespace. Service Entries allow adding external services to the service mesh registry. Use this to inspect external service configurations and mesh expansion settings."),
98-
mcp.WithString("namespace",
99-
mcp.Description("Namespace to query (defaults to 'default'). External service configurations may be centralized in specific namespaces."),
100-
),
101-
mcp.WithTitleAnnotation("Istio: Service Entries"),
102-
mcp.WithReadOnlyHintAnnotation(true),
103-
mcp.WithDestructiveHintAnnotation(false),
104-
),
105-
Handler: s.getServiceEntries,
106-
},
10795
{
10896
Tool: mcp.NewTool("get-service-mesh-hosts",
10997
mcp.WithDescription("List all services and hosts in the service mesh for a specific namespace. Provides a comprehensive overview of ServiceEntries (external services), Kubernetes Services (internal services), and VirtualService configurations. Use this to understand the complete service topology and routing setup in a namespace."),
@@ -343,15 +331,6 @@ func (s *Server) getDestinationRule(ctx context.Context, ctr mcp.CallToolRequest
343331
return NewTextResult(content, err), nil
344332
}
345333

346-
func (s *Server) getServiceEntries(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.CallToolResult, error) {
347-
namespace := "default"
348-
if ns := ctr.GetArguments()["namespace"]; ns != nil {
349-
namespace = ns.(string)
350-
}
351-
content, err := s.i.GetServiceEntries(ctx, namespace)
352-
return NewTextResult(content, err), nil
353-
}
354-
355334
func (s *Server) listServiceMeshHosts(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.CallToolResult, error) {
356335
namespace := "default"
357336
if ns := ctr.GetArguments()["namespace"]; ns != nil {

pkg/mcp/profile_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ func TestToolAnnotations(t *testing.T) {
135135
readOnlyTools := []string{
136136
"get-virtual-service",
137137
"get-destination-rule",
138-
"get-service-entries",
139138
"get-proxy-clusters",
140139
"get-proxy-bootstrap",
141140
}
@@ -251,7 +250,6 @@ func TestToolParameters(t *testing.T) {
251250
namespaceTools := []string{
252251
"get-virtual-service",
253252
"get-destination-rule",
254-
"get-service-entries",
255253
}
256254

257255
for _, toolName := range namespaceTools {

0 commit comments

Comments
 (0)