Skip to main content
Glama

create-namespace

Create a new namespace in Kubernetes clusters to organize and isolate resources, enabling logical separation for applications or teams.

Instructions

Create a new namespace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the namespace to create

Implementation Reference

  • Handler function that executes the 'kubectl create namespace' command using the provided namespace name and returns the command output or a success message.
    case "create-namespace": {
      const { name } = args;
      const cmd = `kubectl create namespace ${name}`;
      const { stdout } = await execAsync(cmd);
      return {
        content: [{ 
          type: "text", 
          text: stdout || `Created namespace ${name}` 
        }]
      };
    }
  • Tool schema definition including name, description, and input schema requiring a 'name' parameter of type string.
      name: "create-namespace",
      description: "Create a new namespace",
      inputSchema: {
        type: "object",
        properties: {
          name: { 
            type: "string",
            description: "The name of the namespace to create"
          }
        },
        required: ["name"]
      }
    },
  • server.js:1392-1394 (registration)
    Registration of all tools list handler, which includes 'create-namespace' in the tools array returned to clients.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
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. While 'Create' implies a write operation, it doesn't specify whether this requires admin permissions, if namespaces are unique, what happens on conflicts, or any rate limits. The description lacks critical behavioral details needed for safe and effective use in a mutation context.

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 extremely concise with just three words, front-loading the key action and resource. There is no wasted language or redundancy, making it easy to scan and understand at a glance. This efficiency is appropriate for a simple tool with minimal parameters.

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 tool's complexity (a mutation operation with no annotations and no output schema), the description is incomplete. It doesn't address behavioral aspects like permissions or idempotency, usage guidelines, or output expectations. For a creation tool in a likely Kubernetes context (inferred from sibling tools), more context is needed to ensure proper 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 input schema has 100% description coverage, with the 'name' parameter fully documented in the schema. The description adds no additional parameter information beyond implying a namespace is created, which is already clear from the tool name and schema. This meets the baseline score of 3, as the schema adequately covers parameter semantics without extra value from the description.

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

Purpose3/5

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

The description 'Create a new namespace' clearly states the verb ('create') and resource ('namespace'), making the basic purpose understandable. However, it lacks specificity about what a namespace entails in this context and doesn't distinguish this tool from other creation tools like 'create-backup' in the sibling list. It's not tautological but remains somewhat vague about the domain.

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 prerequisites (e.g., permissions, context), exclusions, or related tools like 'list-namespaces' from the sibling list. Without such context, users must infer usage based on the name alone, which is insufficient for effective tool selection.

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/thekaranpargaie/kube-mcp'

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