describe-service
Retrieve detailed information about a specific Kubernetes service, including its configuration, endpoints, and current status, to monitor and troubleshoot cluster networking.
Instructions
Describe details of a Kubernetes service
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | The name of the service to describe | |
| namespace | No | The namespace of the service (optional, defaults to current context namespace) |
Implementation Reference
- server.js:1548-1556 (handler)The handler function that implements the core logic of the 'describe-service' tool by executing the 'kubectl describe service' command with the provided service name and optional namespace.case "describe-service": { const { service, namespace } = args; const nsArg = namespace ? `-n ${namespace}` : ""; const cmd = `kubectl describe service ${service} ${nsArg}`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No service details found" }] }; }
- server.js:216-229 (schema)The input schema definition for the 'describe-service' tool, specifying the expected parameters: service (required string) and namespace (optional string). This is used for validation and documentation.inputSchema: { type: "object", properties: { service: { type: "string", description: "The name of the service to describe" }, namespace: { type: "string", description: "The namespace of the service (optional, defaults to current context namespace)" } }, required: ["service"] }
- server.js:213-230 (registration)The tool registration object for 'describe-service' in the tools array, which is returned by the ListTools handler to advertise the tool's availability, name, description, and schema to MCP clients.{ name: "describe-service", description: "Describe details of a Kubernetes service", inputSchema: { type: "object", properties: { service: { type: "string", description: "The name of the service to describe" }, namespace: { type: "string", description: "The namespace of the service (optional, defaults to current context namespace)" } }, required: ["service"] } },