Skip to main content
Glama

service_get

Retrieve detailed information about a specific Kubernetes Service, including configuration and status, to monitor and manage cluster networking resources.

Instructions

Get details of a specific Service.

Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The Service name

Returns: Detailed information about the Service

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • The main handler function for the 'service_get' tool, decorated with @mcp.tool() for registration and @use_current_context. It retrieves detailed information about a specific Kubernetes Service using the Kubernetes API.
    @mcp.tool()
    @use_current_context
    def service_get(context_name: str, namespace: str, name: str):
        """
        Get details of a specific Service.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The Service name
    
        Returns:
            Detailed information about the Service
        """
        core_v1: CoreV1Api = get_api_clients(context_name)["core"]
        service = core_v1.read_namespaced_service(name=name, namespace=namespace)
        return {
            "name": service.metadata.name,
            "type": service.spec.type,
            "cluster_ip": service.spec.cluster_ip,
            "ports": [{"port": port.port, "target_port": port.target_port} for port in service.spec.ports],
            "selector": service.spec.selector
        }
  • server/server.py:22-22 (registration)
    Import of the service tools module in the load_modules function, which triggers the execution of decorators and registers the 'service_get' tool.
    import tools.service  # noqa: F401
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it 'Get details' but doesn't specify what details are returned, potential errors (e.g., if the service doesn't exist), authentication requirements, or rate limits. For a read operation in a Kubernetes context, this leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded with the main purpose, followed by parameter and return sections. It avoids unnecessary fluff, but the 'Returns' section is vague ('Detailed information about the Service'), which slightly reduces efficiency. Overall, it's well-structured and concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of Kubernetes operations, no annotations, no output schema, and 3 parameters with 0% schema coverage, the description is incomplete. It lacks details on return format, error handling, prerequisites (e.g., cluster access), and doesn't leverage sibling context. For a tool in this environment, more information is needed to ensure reliable use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description lists the parameters (context_name, namespace, name) and their purpose, adding meaning beyond the schema which has 0% description coverage. However, it doesn't provide examples, format details (e.g., namespace naming conventions), or constraints, so it only partially compensates for the schema's lack of descriptions. With 3 parameters and low schema coverage, this is adequate but not comprehensive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get details of a specific Service.' It uses a specific verb ('Get') and resource ('Service'), making the action clear. However, it doesn't distinguish itself from sibling tools like 'service_list' or other *_get tools, which is why it doesn't reach a score of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There are many sibling tools (e.g., service_list, service_create, service_update), but no indication of when this specific 'get' operation is appropriate versus listing services or using other resource-specific get tools. This lack of contextual guidance limits its usefulness.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bourbonkk/k8s-pilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server