Skip to main content
Glama

hss__CreateContainerNetworkPolicy

Creates a container cluster network policy in HSS with specified ingress and egress rules to control pod traffic and restrict access by namespace, labels, or IP blocks.

Instructions

[HSS] 容器集群网络添加配置策略

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cluster_id": "<cluster_id>",
      "policy_content": "<policy_content>",
      "project_id": "<project_id>"
    },
    "name": "hss__CreateContainerNetworkPolicy"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo策略名称
namespaceNo命名空间
cluster_idYes集群ID
project_idYes**参数解释**:
policy_contentYes网络策略内容
enterprise_project_idNo**参数解释**:0

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

D1.9/5.0
Behavior1/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses nothing: not whether the policy is applied to the live cluster immediately, whether a duplicate name fails or overwrites, permission requirements, idempotency, or side effects on existing traffic rules. For a mutation tool with a nested Kubernetes policy payload, this is a serious gap.

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

Conciseness3/5

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

It is a single short clause with no wasted words, but that brevity comes from under-specification rather than disciplined editing. Nothing is front-loaded beyond a restatement of the name, so the length is a symptom of missing content rather than efficiency.

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

Completeness1/5

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

Given a required nested NetworkPolicy object, no annotations, no output schema, and a write operation against a cluster, the definition is far too thin. An agent cannot call this correctly from the description alone; it would have to reverse-engineer behavior from the schema example and guess at preconditions and error semantics.

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?

Schema description coverage is 100% and there are 6 parameters (including the deeply nested policy_content with an extensive example), so the schema itself does most of the work and the baseline is 3. The description adds zero meaning beyond the schema, and several schema descriptions (project_id, enterprise_project_id) are hollow placeholders that the description does nothing to compensate for.

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

Purpose2/5

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

The Chinese phrase "容器集群网络添加配置策略" roughly restates the tool name (Create Container Network Policy) without adding specificity: it never says this creates a Kubernetes NetworkPolicy object, never names the scope (cluster/namespace), and does not distinguish it from siblings such as CreateClusterProtectionPolicy, CreateAntiVirusPolicy, or cc__CreateCentralNetworkPolicy. An agent must infer the resource type entirely from the tool name.

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?

There is no when-to-use guidance at all: nothing says when to create a policy versus UpdateContainerNetworkPolicy or DeleteContainerNetworkPolicy, no prerequisites (cluster must exist, protection status), and no exclusions. The sibling list contains the relevant alternatives, but the definition itself does not route the agent.

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

Deploy Server

Other Tools