From 4119c31f0267540a1a403174f30c406feb6c7b42 Mon Sep 17 00:00:00 2001 From: Alberto Gutierrez Date: Mon, 17 Nov 2025 12:30:55 +0100 Subject: [PATCH 1/3] fix(kiali): Tool names with prefix kiali_ Signed-off-by: Alberto Gutierrez --- docs/KIALI.md | 37 ++++++ docs/KIALI_INTEGRATION.md | 170 --------------------------- docs/README.md | 7 ++ internal/tools/update-readme/main.go | 2 +- pkg/toolsets/kiali/graph.go | 2 +- pkg/toolsets/kiali/health.go | 2 +- pkg/toolsets/kiali/istio_config.go | 10 +- pkg/toolsets/kiali/mesh.go | 2 +- pkg/toolsets/kiali/namespaces.go | 2 +- pkg/toolsets/kiali/services.go | 6 +- pkg/toolsets/kiali/traces.go | 6 +- pkg/toolsets/kiali/validations.go | 2 +- pkg/toolsets/kiali/workloads.go | 6 +- 13 files changed, 64 insertions(+), 190 deletions(-) create mode 100644 docs/KIALI.md delete mode 100644 docs/KIALI_INTEGRATION.md diff --git a/docs/KIALI.md b/docs/KIALI.md new file mode 100644 index 00000000..66dad299 --- /dev/null +++ b/docs/KIALI.md @@ -0,0 +1,37 @@ +## Kiali integration + +This server can expose Kiali tools so assistants can query mesh information (e.g., mesh status/graph). + +### Enable the Kiali toolset + +Enable the Kiali tools via the server TOML configuration file. + +Config (TOML): + +```toml +toolsets = ["core", "kiali"] + +[toolset_configs.kiali] +url = "https://kiali.example" +# insecure = true # optional: allow insecure TLS (not recommended in production) +# certificate_authority = """-----BEGIN CERTIFICATE----- +# MIID... +# -----END CERTIFICATE-----""" +# When url is https and insecure is false, certificate_authority is required. +``` + +When the `kiali` toolset is enabled, a Kiali toolset configuration is required via `[toolset_configs.kiali]`. If missing or invalid, the server will refuse to start. + +### How authentication works + +- The server uses your existing Kubernetes credentials (from kubeconfig or in-cluster) to set a bearer token for Kiali calls. +- If you pass an HTTP Authorization header to the MCP HTTP endpoint, that is not required for Kiali; Kiali calls use the server's configured token. + +### Troubleshooting + +- Missing Kiali configuration when `kiali` toolset is enabled → set `[toolset_configs.kiali].url` in the config TOML. +- Invalid URL → ensure `[toolset_configs.kiali].url` is a valid `http(s)://host` URL. +- TLS certificate validation: + - If `[toolset_configs.kiali].url` uses HTTPS and `[toolset_configs.kiali].insecure` is false, you must set `[toolset_configs.kiali].certificate_authority` with the PEM-encoded certificate(s) used by the Kiali server. This field expects inline PEM content, not a file path. You may concatenate multiple PEM blocks to include an intermediate chain. + - For non-production environments you can set `[toolset_configs.kiali].insecure = true` to skip certificate verification. + diff --git a/docs/KIALI_INTEGRATION.md b/docs/KIALI_INTEGRATION.md deleted file mode 100644 index 00952744..00000000 --- a/docs/KIALI_INTEGRATION.md +++ /dev/null @@ -1,170 +0,0 @@ -## Kiali integration - -This server can expose Kiali tools so assistants can query mesh information (e.g., mesh status/graph). - -### Enable the Kiali toolset - -Enable the Kiali tools via the server TOML configuration file. - -Config (TOML): - -```toml -toolsets = ["core", "kiali"] - -[toolset_configs.kiali] -url = "https://kiali.example" -# insecure = true # optional: allow insecure TLS (not recommended in production) -# certificate_authority = """-----BEGIN CERTIFICATE----- -# MIID... -# -----END CERTIFICATE-----""" -# When url is https and insecure is false, certificate_authority is required. -``` - -When the `kiali` toolset is enabled, a Kiali toolset configuration is required via `[toolset_configs.kiali]`. If missing or invalid, the server will refuse to start. - -### How authentication works - -- The server uses your existing Kubernetes credentials (from kubeconfig or in-cluster) to set a bearer token for Kiali calls. -- If you pass an HTTP Authorization header to the MCP HTTP endpoint, that is not required for Kiali; Kiali calls use the server's configured token. - -### Available tools (initial) - -
- -kiali - -- **graph** - Check the status of my mesh by querying Kiali graph - - `namespace` (`string`) - Optional single namespace to include in the graph (alternative to namespaces) - - `namespaces` (`string`) - Optional comma-separated list of namespaces to include in the graph - -- **mesh_status** - Get the status of mesh components including Istio, Kiali, Grafana, Prometheus and their interactions, versions, and health status - -- **istio_config** - Get all Istio configuration objects in the mesh including their full YAML resources and details - -- **istio_object_details** - Get detailed information about a specific Istio object including validation and help information - - `group` (`string`) **(required)** - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io') - - `kind` (`string`) **(required)** - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway') - - `name` (`string`) **(required)** - Name of the Istio object - - `namespace` (`string`) **(required)** - Namespace containing the Istio object - - `version` (`string`) **(required)** - API version of the Istio object (e.g., 'v1', 'v1beta1') - -- **istio_object_patch** - Modify an existing Istio object using PATCH method. The JSON patch data will be applied to the existing object. - - `group` (`string`) **(required)** - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io') - - `json_patch` (`string`) **(required)** - JSON patch data to apply to the object - - `kind` (`string`) **(required)** - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway') - - `name` (`string`) **(required)** - Name of the Istio object - - `namespace` (`string`) **(required)** - Namespace containing the Istio object - - `version` (`string`) **(required)** - API version of the Istio object (e.g., 'v1', 'v1beta1') - -- **istio_object_create** - Create a new Istio object using POST method. The JSON data will be used to create the new object. - - `group` (`string`) **(required)** - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io') - - `json_data` (`string`) **(required)** - JSON data for the new object - - `kind` (`string`) **(required)** - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway') - - `namespace` (`string`) **(required)** - Namespace where the Istio object will be created - - `version` (`string`) **(required)** - API version of the Istio object (e.g., 'v1', 'v1beta1') - -- **istio_object_delete** - Delete an existing Istio object using DELETE method. - - `group` (`string`) **(required)** - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io') - - `kind` (`string`) **(required)** - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway') - - `name` (`string`) **(required)** - Name of the Istio object - - `namespace` (`string`) **(required)** - Namespace containing the Istio object - - `version` (`string`) **(required)** - API version of the Istio object (e.g., 'v1', 'v1beta1') - -- **validations_list** - List all the validations in the current cluster from all namespaces - - `namespace` (`string`) - Optional single namespace to retrieve validations from (alternative to namespaces) - - `namespaces` (`string`) - Optional comma-separated list of namespaces to retrieve validations from - -- **namespaces** - Get all namespaces in the mesh that the user has access to - -- **services_list** - Get all services in the mesh across specified namespaces with health and Istio resource information - - `namespaces` (`string`) - Comma-separated list of namespaces to get services from (e.g. 'bookinfo' or 'bookinfo,default'). If not provided, will list services from all accessible namespaces - -- **service_details** - Get detailed information for a specific service in a namespace, including validation, health status, and configuration - - `namespace` (`string`) **(required)** - Namespace containing the service - - `service` (`string`) **(required)** - Name of the service to get details for - -- **service_metrics** - Get metrics for a specific service in a namespace. Supports filtering by time range, direction (inbound/outbound), reporter, and other query parameters - - `byLabels` (`string`) - Comma-separated list of labels to group metrics by (e.g., 'source_workload,destination_service'). Optional - - `direction` (`string`) - Traffic direction: 'inbound' or 'outbound'. Optional, defaults to 'outbound' - - `duration` (`string`) - Duration of the query period in seconds (e.g., '1800' for 30 minutes). Optional, defaults to 1800 seconds - - `namespace` (`string`) **(required)** - Namespace containing the service - - `quantiles` (`string`) - Comma-separated list of quantiles for histogram metrics (e.g., '0.5,0.95,0.99'). Optional - - `rateInterval` (`string`) - Rate interval for metrics (e.g., '1m', '5m'). Optional, defaults to '1m' - - `reporter` (`string`) - Metrics reporter: 'source', 'destination', or 'both'. Optional, defaults to 'source' - - `requestProtocol` (`string`) - Filter by request protocol (e.g., 'http', 'grpc', 'tcp'). Optional - - `service` (`string`) **(required)** - Name of the service to get metrics for - - `step` (`string`) - Step between data points in seconds (e.g., '15'). Optional, defaults to 15 seconds - -- **workloads_list** - Get all workloads in the mesh across specified namespaces with health and Istio resource information - - `namespaces` (`string`) - Comma-separated list of namespaces to get workloads from (e.g. 'bookinfo' or 'bookinfo,default'). If not provided, will list workloads from all accessible namespaces - -- **workload_details** - Get detailed information for a specific workload in a namespace, including validation, health status, and configuration - - `namespace` (`string`) **(required)** - Namespace containing the workload - - `workload` (`string`) **(required)** - Name of the workload to get details for - -- **workload_metrics** - Get metrics for a specific workload in a namespace. Supports filtering by time range, direction (inbound/outbound), reporter, and other query parameters - - `byLabels` (`string`) - Comma-separated list of labels to group metrics by (e.g., 'source_workload,destination_service'). Optional - - `direction` (`string`) - Traffic direction: 'inbound' or 'outbound'. Optional, defaults to 'outbound' - - `duration` (`string`) - Duration of the query period in seconds (e.g., '1800' for 30 minutes). Optional, defaults to 1800 seconds - - `namespace` (`string`) **(required)** - Namespace containing the workload - - `quantiles` (`string`) - Comma-separated list of quantiles for histogram metrics (e.g., '0.5,0.95,0.99'). Optional - - `rateInterval` (`string`) - Rate interval for metrics (e.g., '1m', '5m'). Optional, defaults to '1m' - - `reporter` (`string`) - Metrics reporter: 'source', 'destination', or 'both'. Optional, defaults to 'source' - - `requestProtocol` (`string`) - Filter by request protocol (e.g., 'http', 'grpc', 'tcp'). Optional - - `step` (`string`) - Step between data points in seconds (e.g., '15'). Optional, defaults to 15 seconds - - `workload` (`string`) **(required)** - Name of the workload to get metrics for - -- **health** - Get health status for apps, workloads, and services across specified namespaces in the mesh. Returns health information including error rates and status for the requested resource type - - `namespaces` (`string`) - Comma-separated list of namespaces to get health from (e.g. 'bookinfo' or 'bookinfo,default'). If not provided, returns health for all accessible namespaces - - `queryTime` (`string`) - Unix timestamp (in seconds) for the prometheus query. If not provided, uses current time. Optional - - `rateInterval` (`string`) - Rate interval for fetching error rate (e.g., '10m', '5m', '1h'). Default: '10m' - - `type` (`string`) - Type of health to retrieve: 'app', 'service', or 'workload'. Default: 'app' - -- **workload_logs** - Get logs for a specific workload's pods in a namespace. Only requires namespace and workload name - automatically discovers pods and containers. Optionally filter by container name, time range, and other parameters. Container is auto-detected if not specified. - - `container` (`string`) - Optional container name to filter logs. If not provided, automatically detects and uses the main application container (excludes istio-proxy and istio-init) - - `namespace` (`string`) **(required)** - Namespace containing the workload - - `since` (`string`) - Time duration to fetch logs from (e.g., '5m', '1h', '30s'). If not provided, returns recent logs - - `tail` (`integer`) - Number of lines to retrieve from the end of logs (default: 100) - - `workload` (`string`) **(required)** - Name of the workload to get logs for - -- **app_traces** - Get distributed tracing data for a specific app in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis. - - `app` (`string`) **(required)** - Name of the app to get traces for - - `clusterName` (`string`) - Cluster name for multi-cluster environments (optional) - - `endMicros` (`string`) - End time for traces in microseconds since epoch (optional) - - `limit` (`integer`) - Maximum number of traces to return (default: 100) - - `minDuration` (`integer`) - Minimum trace duration in microseconds (optional) - - `namespace` (`string`) **(required)** - Namespace containing the app - - `startMicros` (`string`) - Start time for traces in microseconds since epoch (optional) - - `tags` (`string`) - JSON string of tags to filter traces (optional) - -- **service_traces** - Get distributed tracing data for a specific service in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis. - - `clusterName` (`string`) - Cluster name for multi-cluster environments (optional) - - `endMicros` (`string`) - End time for traces in microseconds since epoch (optional) - - `limit` (`integer`) - Maximum number of traces to return (default: 100) - - `minDuration` (`integer`) - Minimum trace duration in microseconds (optional) - - `namespace` (`string`) **(required)** - Namespace containing the service - - `service` (`string`) **(required)** - Name of the service to get traces for - - `startMicros` (`string`) - Start time for traces in microseconds since epoch (optional) - - `tags` (`string`) - JSON string of tags to filter traces (optional) - -- **workload_traces** - Get distributed tracing data for a specific workload in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis. - - `clusterName` (`string`) - Cluster name for multi-cluster environments (optional) - - `endMicros` (`string`) - End time for traces in microseconds since epoch (optional) - - `limit` (`integer`) - Maximum number of traces to return (default: 100) - - `minDuration` (`integer`) - Minimum trace duration in microseconds (optional) - - `namespace` (`string`) **(required)** - Namespace containing the workload - - `startMicros` (`string`) - Start time for traces in microseconds since epoch (optional) - - `tags` (`string`) - JSON string of tags to filter traces (optional) - - `workload` (`string`) **(required)** - Name of the workload to get traces for - -
- -### Troubleshooting - -- Missing Kiali configuration when `kiali` toolset is enabled → set `[toolset_configs.kiali].url` in the config TOML. -- Invalid URL → ensure `[toolset_configs.kiali].url` is a valid `http(s)://host` URL. -- TLS certificate validation: - - If `[toolset_configs.kiali].url` uses HTTPS and `[toolset_configs.kiali].insecure` is false, you must set `[toolset_configs.kiali].certificate_authority` with the PEM-encoded certificate(s) used by the Kiali server. This field expects inline PEM content, not a file path. You may concatenate multiple PEM blocks to include an intermediate chain. - - For non-production environments you can set `[toolset_configs.kiali].insecure = true` to skip certificate verification. - - diff --git a/docs/README.md b/docs/README.md index 0eaa634e..a972f952 100644 --- a/docs/README.md +++ b/docs/README.md @@ -16,7 +16,14 @@ Choose the guide that matches your needs: 1. **Complete the base setup**: Start with [Getting Started with Kubernetes](GETTING_STARTED_KUBERNETES.md) to create a ServiceAccount and kubeconfig file 2. **Configure Claude Code**: Then follow the [Claude Code CLI guide](GETTING_STARTED_CLAUDE_CODE.md) +## Other toolsets + +- **[Kiali](KIALI_INTEGRATION.md)** - Tools for Kiali ServiceMesh with Istio + ## Additional Documentation - **[Keycloak OIDC Setup](KEYCLOAK_OIDC_SETUP.md)** - Developer guide for local Keycloak environment and testing with MCP Inspector - **[Main README](../README.md)** - Project overview and general information + + + diff --git a/internal/tools/update-readme/main.go b/internal/tools/update-readme/main.go index 79cf7325..b0e54405 100644 --- a/internal/tools/update-readme/main.go +++ b/internal/tools/update-readme/main.go @@ -119,4 +119,4 @@ func replaceBetweenMarkers(content, startMarker, endMarker, replacement string) return content } return content[:startIdx+len(startMarker)] + "\n\n" + replacement + "\n" + content[endIdx:] -} +} \ No newline at end of file diff --git a/pkg/toolsets/kiali/graph.go b/pkg/toolsets/kiali/graph.go index 6bf32d47..a0a50f92 100644 --- a/pkg/toolsets/kiali/graph.go +++ b/pkg/toolsets/kiali/graph.go @@ -14,7 +14,7 @@ func initGraph() []api.ServerTool { ret := make([]api.ServerTool, 0) ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "graph", + Name: "kiali_graph", Description: "Check the status of my mesh by querying Kiali graph", InputSchema: &jsonschema.Schema{ Type: "object", diff --git a/pkg/toolsets/kiali/health.go b/pkg/toolsets/kiali/health.go index 01b86e1e..dd9f98fb 100644 --- a/pkg/toolsets/kiali/health.go +++ b/pkg/toolsets/kiali/health.go @@ -15,7 +15,7 @@ func initHealth() []api.ServerTool { // Cluster health tool ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "health", + Name: "kiali_health", Description: "Get health status for apps, workloads, and services across specified namespaces in the mesh. Returns health information including error rates and status for the requested resource type", InputSchema: &jsonschema.Schema{ Type: "object", diff --git a/pkg/toolsets/kiali/istio_config.go b/pkg/toolsets/kiali/istio_config.go index df8a97c6..79fb75c5 100644 --- a/pkg/toolsets/kiali/istio_config.go +++ b/pkg/toolsets/kiali/istio_config.go @@ -13,7 +13,7 @@ func initIstioConfig() []api.ServerTool { ret := make([]api.ServerTool, 0) ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "istio_config", + Name: "kiali_istio_config", Description: "Get all Istio configuration objects in the mesh including their full YAML resources and details", InputSchema: &jsonschema.Schema{ Type: "object", @@ -45,7 +45,7 @@ func initIstioObjectDetails() []api.ServerTool { ret := make([]api.ServerTool, 0) ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "istio_object_details", + Name: "kiali_istio_object_details", Description: "Get detailed information about a specific Istio object including validation and help information", InputSchema: &jsonschema.Schema{ Type: "object", @@ -105,7 +105,7 @@ func initIstioObjectPatch() []api.ServerTool { ret := make([]api.ServerTool, 0) ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "istio_object_patch", + Name: "kiali_istio_object_patch", Description: "Modify an existing Istio object using PATCH method. The JSON patch data will be applied to the existing object.", InputSchema: &jsonschema.Schema{ Type: "object", @@ -170,7 +170,7 @@ func initIstioObjectCreate() []api.ServerTool { ret := make([]api.ServerTool, 0) ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "istio_object_create", + Name: "kiali_istio_object_create", Description: "Create a new Istio object using POST method. The JSON data will be used to create the new object.", InputSchema: &jsonschema.Schema{ Type: "object", @@ -230,7 +230,7 @@ func initIstioObjectDelete() []api.ServerTool { ret := make([]api.ServerTool, 0) ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "istio_object_delete", + Name: "kiali_istio_object_delete", Description: "Delete an existing Istio object using DELETE method.", InputSchema: &jsonschema.Schema{ Type: "object", diff --git a/pkg/toolsets/kiali/mesh.go b/pkg/toolsets/kiali/mesh.go index d13fa48b..6e134f8a 100644 --- a/pkg/toolsets/kiali/mesh.go +++ b/pkg/toolsets/kiali/mesh.go @@ -13,7 +13,7 @@ func initMeshStatus() []api.ServerTool { ret := make([]api.ServerTool, 0) ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "mesh_status", + Name: "kiali_mesh_status", Description: "Get the status of mesh components including Istio, Kiali, Grafana, Prometheus and their interactions, versions, and health status", InputSchema: &jsonschema.Schema{ Type: "object", diff --git a/pkg/toolsets/kiali/namespaces.go b/pkg/toolsets/kiali/namespaces.go index a006f2b1..a380cc82 100644 --- a/pkg/toolsets/kiali/namespaces.go +++ b/pkg/toolsets/kiali/namespaces.go @@ -13,7 +13,7 @@ func initNamespaces() []api.ServerTool { ret := make([]api.ServerTool, 0) ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "namespaces", + Name: "kiali_namespaces", Description: "Get all namespaces in the mesh that the user has access to", InputSchema: &jsonschema.Schema{ Type: "object", diff --git a/pkg/toolsets/kiali/services.go b/pkg/toolsets/kiali/services.go index 1fd2018c..30ff6557 100644 --- a/pkg/toolsets/kiali/services.go +++ b/pkg/toolsets/kiali/services.go @@ -15,7 +15,7 @@ func initServices() []api.ServerTool { // Services list tool ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "services_list", + Name: "kiali_services_list", Description: "Get all services in the mesh across specified namespaces with health and Istio resource information", InputSchema: &jsonschema.Schema{ Type: "object", @@ -39,7 +39,7 @@ func initServices() []api.ServerTool { // Service details tool ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "service_details", + Name: "kiali_service_details", Description: "Get detailed information for a specific service in a namespace, including validation, health status, and configuration", InputSchema: &jsonschema.Schema{ Type: "object", @@ -68,7 +68,7 @@ func initServices() []api.ServerTool { // Service metrics tool ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "service_metrics", + Name: "kiali_service_metrics", Description: "Get metrics for a specific service in a namespace. Supports filtering by time range, direction (inbound/outbound), reporter, and other query parameters", InputSchema: &jsonschema.Schema{ Type: "object", diff --git a/pkg/toolsets/kiali/traces.go b/pkg/toolsets/kiali/traces.go index fd5aacc9..e9169505 100644 --- a/pkg/toolsets/kiali/traces.go +++ b/pkg/toolsets/kiali/traces.go @@ -15,7 +15,7 @@ func initTraces() []api.ServerTool { // App traces tool ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "app_traces", + Name: "kiali_app_traces", Description: "Get distributed tracing data for a specific app in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis.", InputSchema: &jsonschema.Schema{ Type: "object", @@ -71,7 +71,7 @@ func initTraces() []api.ServerTool { // Service traces tool ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "service_traces", + Name: "kiali_service_traces", Description: "Get distributed tracing data for a specific service in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis.", InputSchema: &jsonschema.Schema{ Type: "object", @@ -127,7 +127,7 @@ func initTraces() []api.ServerTool { // Workload traces tool ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "workload_traces", + Name: "kiali_workload_traces", Description: "Get distributed tracing data for a specific workload in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis.", InputSchema: &jsonschema.Schema{ Type: "object", diff --git a/pkg/toolsets/kiali/validations.go b/pkg/toolsets/kiali/validations.go index 898f7d03..6201da9a 100644 --- a/pkg/toolsets/kiali/validations.go +++ b/pkg/toolsets/kiali/validations.go @@ -14,7 +14,7 @@ func initValidations() []api.ServerTool { ret := make([]api.ServerTool, 0) ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "validations_list", + Name: "kiali_validations_list", Description: "List all the validations in the current cluster from all namespaces", InputSchema: &jsonschema.Schema{ Type: "object", diff --git a/pkg/toolsets/kiali/workloads.go b/pkg/toolsets/kiali/workloads.go index f8d03a28..6d2b30cb 100644 --- a/pkg/toolsets/kiali/workloads.go +++ b/pkg/toolsets/kiali/workloads.go @@ -15,7 +15,7 @@ func initWorkloads() []api.ServerTool { // Workloads list tool ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "workloads_list", + Name: "kiali_workloads_list", Description: "Get all workloads in the mesh across specified namespaces with health and Istio resource information", InputSchema: &jsonschema.Schema{ Type: "object", @@ -39,7 +39,7 @@ func initWorkloads() []api.ServerTool { // Workload details tool ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "workload_details", + Name: "kiali_workload_details", Description: "Get detailed information for a specific workload in a namespace, including validation, health status, and configuration", InputSchema: &jsonschema.Schema{ Type: "object", @@ -68,7 +68,7 @@ func initWorkloads() []api.ServerTool { // Workload metrics tool ret = append(ret, api.ServerTool{ Tool: api.Tool{ - Name: "workload_metrics", + Name: "kiali_workload_metrics", Description: "Get metrics for a specific workload in a namespace. Supports filtering by time range, direction (inbound/outbound), reporter, and other query parameters", InputSchema: &jsonschema.Schema{ Type: "object", From a99bf888cbfec16b1e18a12ae653620423b64517 Mon Sep 17 00:00:00 2001 From: Alberto Gutierrez Date: Thu, 20 Nov 2025 15:12:46 +0100 Subject: [PATCH 2/3] Change links Signed-off-by: Alberto Gutierrez --- README.md | 40 ++++++++++++++-------------- docs/README.md | 2 +- internal/tools/update-readme/main.go | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 4758c0d9..ffd12a25 100644 --- a/README.md +++ b/README.md @@ -213,7 +213,7 @@ The following sets of tools are available (toolsets marked with ✓ in the Defau | config | View and manage the current local Kubernetes configuration (kubeconfig) | ✓ | | core | Most common tools for Kubernetes management (Pods, Generic Resources, Events, etc.) | ✓ | | helm | Tools for managing Helm charts and releases | ✓ | -| kiali | Most common tools for managing Kiali, check the [Kiali integration documentation](https://github.com/containers/kubernetes-mcp-server/blob/main/docs/KIALI_INTEGRATION.md) for more details. | | +| kiali | Most common tools for managing Kiali, check the [Kiali documentation](https://github.com/containers/kubernetes-mcp-server/blob/main/docs/KIALI.md) for more details. | | @@ -348,22 +348,22 @@ In case multi-cluster support is enabled (default) and you have access to multip kiali -- **graph** - Check the status of my mesh by querying Kiali graph +- **kiali_graph** - Check the status of my mesh by querying Kiali graph - `namespace` (`string`) - Optional single namespace to include in the graph (alternative to namespaces) - `namespaces` (`string`) - Optional comma-separated list of namespaces to include in the graph -- **mesh_status** - Get the status of mesh components including Istio, Kiali, Grafana, Prometheus and their interactions, versions, and health status +- **kiali_mesh_status** - Get the status of mesh components including Istio, Kiali, Grafana, Prometheus and their interactions, versions, and health status -- **istio_config** - Get all Istio configuration objects in the mesh including their full YAML resources and details +- **kiali_istio_config** - Get all Istio configuration objects in the mesh including their full YAML resources and details -- **istio_object_details** - Get detailed information about a specific Istio object including validation and help information +- **kiali_istio_object_details** - Get detailed information about a specific Istio object including validation and help information - `group` (`string`) **(required)** - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io') - `kind` (`string`) **(required)** - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway') - `name` (`string`) **(required)** - Name of the Istio object - `namespace` (`string`) **(required)** - Namespace containing the Istio object - `version` (`string`) **(required)** - API version of the Istio object (e.g., 'v1', 'v1beta1') -- **istio_object_patch** - Modify an existing Istio object using PATCH method. The JSON patch data will be applied to the existing object. +- **kiali_istio_object_patch** - Modify an existing Istio object using PATCH method. The JSON patch data will be applied to the existing object. - `group` (`string`) **(required)** - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io') - `json_patch` (`string`) **(required)** - JSON patch data to apply to the object - `kind` (`string`) **(required)** - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway') @@ -371,34 +371,34 @@ In case multi-cluster support is enabled (default) and you have access to multip - `namespace` (`string`) **(required)** - Namespace containing the Istio object - `version` (`string`) **(required)** - API version of the Istio object (e.g., 'v1', 'v1beta1') -- **istio_object_create** - Create a new Istio object using POST method. The JSON data will be used to create the new object. +- **kiali_istio_object_create** - Create a new Istio object using POST method. The JSON data will be used to create the new object. - `group` (`string`) **(required)** - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io') - `json_data` (`string`) **(required)** - JSON data for the new object - `kind` (`string`) **(required)** - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway') - `namespace` (`string`) **(required)** - Namespace where the Istio object will be created - `version` (`string`) **(required)** - API version of the Istio object (e.g., 'v1', 'v1beta1') -- **istio_object_delete** - Delete an existing Istio object using DELETE method. +- **kiali_istio_object_delete** - Delete an existing Istio object using DELETE method. - `group` (`string`) **(required)** - API group of the Istio object (e.g., 'networking.istio.io', 'gateway.networking.k8s.io') - `kind` (`string`) **(required)** - Kind of the Istio object (e.g., 'DestinationRule', 'VirtualService', 'HTTPRoute', 'Gateway') - `name` (`string`) **(required)** - Name of the Istio object - `namespace` (`string`) **(required)** - Namespace containing the Istio object - `version` (`string`) **(required)** - API version of the Istio object (e.g., 'v1', 'v1beta1') -- **validations_list** - List all the validations in the current cluster from all namespaces +- **kiali_validations_list** - List all the validations in the current cluster from all namespaces - `namespace` (`string`) - Optional single namespace to retrieve validations from (alternative to namespaces) - `namespaces` (`string`) - Optional comma-separated list of namespaces to retrieve validations from -- **namespaces** - Get all namespaces in the mesh that the user has access to +- **kiali_namespaces** - Get all namespaces in the mesh that the user has access to -- **services_list** - Get all services in the mesh across specified namespaces with health and Istio resource information +- **kiali_services_list** - Get all services in the mesh across specified namespaces with health and Istio resource information - `namespaces` (`string`) - Comma-separated list of namespaces to get services from (e.g. 'bookinfo' or 'bookinfo,default'). If not provided, will list services from all accessible namespaces -- **service_details** - Get detailed information for a specific service in a namespace, including validation, health status, and configuration +- **kiali_service_details** - Get detailed information for a specific service in a namespace, including validation, health status, and configuration - `namespace` (`string`) **(required)** - Namespace containing the service - `service` (`string`) **(required)** - Name of the service to get details for -- **service_metrics** - Get metrics for a specific service in a namespace. Supports filtering by time range, direction (inbound/outbound), reporter, and other query parameters +- **kiali_service_metrics** - Get metrics for a specific service in a namespace. Supports filtering by time range, direction (inbound/outbound), reporter, and other query parameters - `byLabels` (`string`) - Comma-separated list of labels to group metrics by (e.g., 'source_workload,destination_service'). Optional - `direction` (`string`) - Traffic direction: 'inbound' or 'outbound'. Optional, defaults to 'outbound' - `duration` (`string`) - Duration of the query period in seconds (e.g., '1800' for 30 minutes). Optional, defaults to 1800 seconds @@ -410,14 +410,14 @@ In case multi-cluster support is enabled (default) and you have access to multip - `service` (`string`) **(required)** - Name of the service to get metrics for - `step` (`string`) - Step between data points in seconds (e.g., '15'). Optional, defaults to 15 seconds -- **workloads_list** - Get all workloads in the mesh across specified namespaces with health and Istio resource information +- **kiali_workloads_list** - Get all workloads in the mesh across specified namespaces with health and Istio resource information - `namespaces` (`string`) - Comma-separated list of namespaces to get workloads from (e.g. 'bookinfo' or 'bookinfo,default'). If not provided, will list workloads from all accessible namespaces -- **workload_details** - Get detailed information for a specific workload in a namespace, including validation, health status, and configuration +- **kiali_workload_details** - Get detailed information for a specific workload in a namespace, including validation, health status, and configuration - `namespace` (`string`) **(required)** - Namespace containing the workload - `workload` (`string`) **(required)** - Name of the workload to get details for -- **workload_metrics** - Get metrics for a specific workload in a namespace. Supports filtering by time range, direction (inbound/outbound), reporter, and other query parameters +- **kiali_workload_metrics** - Get metrics for a specific workload in a namespace. Supports filtering by time range, direction (inbound/outbound), reporter, and other query parameters - `byLabels` (`string`) - Comma-separated list of labels to group metrics by (e.g., 'source_workload,destination_service'). Optional - `direction` (`string`) - Traffic direction: 'inbound' or 'outbound'. Optional, defaults to 'outbound' - `duration` (`string`) - Duration of the query period in seconds (e.g., '1800' for 30 minutes). Optional, defaults to 1800 seconds @@ -429,7 +429,7 @@ In case multi-cluster support is enabled (default) and you have access to multip - `step` (`string`) - Step between data points in seconds (e.g., '15'). Optional, defaults to 15 seconds - `workload` (`string`) **(required)** - Name of the workload to get metrics for -- **health** - Get health status for apps, workloads, and services across specified namespaces in the mesh. Returns health information including error rates and status for the requested resource type +- **kiali_health** - Get health status for apps, workloads, and services across specified namespaces in the mesh. Returns health information including error rates and status for the requested resource type - `namespaces` (`string`) - Comma-separated list of namespaces to get health from (e.g. 'bookinfo' or 'bookinfo,default'). If not provided, returns health for all accessible namespaces - `queryTime` (`string`) - Unix timestamp (in seconds) for the prometheus query. If not provided, uses current time. Optional - `rateInterval` (`string`) - Rate interval for fetching error rate (e.g., '10m', '5m', '1h'). Default: '10m' @@ -442,7 +442,7 @@ In case multi-cluster support is enabled (default) and you have access to multip - `tail` (`integer`) - Number of lines to retrieve from the end of logs (default: 100) - `workload` (`string`) **(required)** - Name of the workload to get logs for -- **app_traces** - Get distributed tracing data for a specific app in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis. +- **kiali_app_traces** - Get distributed tracing data for a specific app in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis. - `app` (`string`) **(required)** - Name of the app to get traces for - `clusterName` (`string`) - Cluster name for multi-cluster environments (optional) - `endMicros` (`string`) - End time for traces in microseconds since epoch (optional) @@ -452,7 +452,7 @@ In case multi-cluster support is enabled (default) and you have access to multip - `startMicros` (`string`) - Start time for traces in microseconds since epoch (optional) - `tags` (`string`) - JSON string of tags to filter traces (optional) -- **service_traces** - Get distributed tracing data for a specific service in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis. +- **kiali_service_traces** - Get distributed tracing data for a specific service in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis. - `clusterName` (`string`) - Cluster name for multi-cluster environments (optional) - `endMicros` (`string`) - End time for traces in microseconds since epoch (optional) - `limit` (`integer`) - Maximum number of traces to return (default: 100) @@ -462,7 +462,7 @@ In case multi-cluster support is enabled (default) and you have access to multip - `startMicros` (`string`) - Start time for traces in microseconds since epoch (optional) - `tags` (`string`) - JSON string of tags to filter traces (optional) -- **workload_traces** - Get distributed tracing data for a specific workload in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis. +- **kiali_workload_traces** - Get distributed tracing data for a specific workload in a namespace. Returns trace information including spans, duration, and error details for troubleshooting and performance analysis. - `clusterName` (`string`) - Cluster name for multi-cluster environments (optional) - `endMicros` (`string`) - End time for traces in microseconds since epoch (optional) - `limit` (`integer`) - Maximum number of traces to return (default: 100) diff --git a/docs/README.md b/docs/README.md index a972f952..d33557d8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -18,7 +18,7 @@ Choose the guide that matches your needs: ## Other toolsets -- **[Kiali](KIALI_INTEGRATION.md)** - Tools for Kiali ServiceMesh with Istio +- **[Kiali](KIALI.md)** - Tools for Kiali ServiceMesh with Istio ## Additional Documentation diff --git a/internal/tools/update-readme/main.go b/internal/tools/update-readme/main.go index b0e54405..79cf7325 100644 --- a/internal/tools/update-readme/main.go +++ b/internal/tools/update-readme/main.go @@ -119,4 +119,4 @@ func replaceBetweenMarkers(content, startMarker, endMarker, replacement string) return content } return content[:startIdx+len(startMarker)] + "\n\n" + replacement + "\n" + content[endIdx:] -} \ No newline at end of file +} From 62db37ee7a627567294a11d26b0b04ffe3a011f3 Mon Sep 17 00:00:00 2001 From: Alberto Gutierrez Date: Fri, 21 Nov 2025 17:16:07 +0100 Subject: [PATCH 3/3] Add comment to the url configuration Signed-off-by: Alberto Gutierrez --- docs/KIALI.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/KIALI.md b/docs/KIALI.md index 66dad299..5b8f4b9f 100644 --- a/docs/KIALI.md +++ b/docs/KIALI.md @@ -12,7 +12,7 @@ Config (TOML): toolsets = ["core", "kiali"] [toolset_configs.kiali] -url = "https://kiali.example" +url = "https://kiali.example" # Endpoint/route to reach Kiali console # insecure = true # optional: allow insecure TLS (not recommended in production) # certificate_authority = """-----BEGIN CERTIFICATE----- # MIID...