Skip to main content
Glama

serviceaccount_get

Retrieve detailed information about a specific Kubernetes ServiceAccount, including its configuration and permissions, by specifying context, namespace, and name.

Instructions

Get details of a specific ServiceAccount.

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

Returns: Detailed information about the ServiceAccount

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • The handler function for the 'serviceaccount_get' tool. It retrieves detailed information about a specific Kubernetes ServiceAccount using the CoreV1Api client. The function is decorated with @mcp.tool() for registration and @use_current_context for context management.
    @mcp.tool()
    @use_current_context
    def serviceaccount_get(context_name: str, namespace: str, name: str):
        """
        Get details of a specific ServiceAccount.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The ServiceAccount name
    
        Returns:
            Detailed information about the ServiceAccount
        """
        core_v1: CoreV1Api = get_api_clients(context_name)["core"]
        serviceaccount = core_v1.read_namespaced_service_account(name=name, namespace=namespace)
        return {
            "name": serviceaccount.metadata.name,
            "labels": serviceaccount.metadata.labels,
            "secrets": serviceaccount.secrets
        }
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 the tool retrieves details but doesn't mention whether it's a read-only operation, if it requires specific permissions, what format the details are in, or any error conditions. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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

Conciseness5/5

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

The description is well-structured and concise, with no wasted words. It front-loads the purpose in the first sentence, followed by clear sections for arguments and returns. Every sentence earns its place, making it easy to scan and understand quickly.

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

Completeness3/5

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

Given the complexity (a read operation with 3 required parameters), no annotations, and no output schema, the description is moderately complete. It covers the purpose and parameters but lacks behavioral details like permissions, error handling, or output format. For a tool in this context, it meets minimum viability but has clear gaps that could hinder effective 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 schema description coverage is 0%, but the description includes an 'Args' section that lists and briefly describes all three parameters (context_name, namespace, name). This adds meaningful context beyond the bare schema, explaining what each parameter represents. However, it doesn't provide examples, constraints, or format details, keeping it at a baseline level.

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 ServiceAccount.' It uses a specific verb ('Get') and resource ('ServiceAccount'), making the action clear. However, it doesn't explicitly differentiate from sibling tools like 'serviceaccount_list' or 'serviceaccount_delete', which would be needed for a perfect score.

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. It doesn't mention sibling tools like 'serviceaccount_list' (for listing multiple) or 'serviceaccount_delete' (for removal), nor does it specify prerequisites or contexts where this tool is preferred. The usage is implied but not explicitly stated.

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