Skip to main content
Glama

dsc__AddRule

Creates a custom sensitive data recognition rule for Huawei Cloud DSC using the specified rule name, type, risk level, minimum matches, and rule content.

Instructions

[DSC] 根据指定的规则名称、规则类型、风险等级、最小匹配次数等参数创建自定义的敏感数据识别规则

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": {
      "category": "<category>",
      "logic_operator": "<logic_operator>",
      "min_match": "<min_match>",
      "project_id": "<project_id>",
      "risk_level": "<risk_level>",
      "rule_content": "<rule_content>",
      "rule_name": "<rule_name>",
      "rule_type": "<rule_type>"
    },
    "name": "dsc__AddRule"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNo规则ID
categoryYes规则类别,内置规则(BUILT_IN)或自建规则(BUILT_SELF)
min_matchYes最小匹配次数
rule_descNo规则描述
rule_nameYes规则名称
rule_typeYes规则类型,关键字(KEYWORD)、正则表达式(REGEX)或自然语言(NLP)
project_idYes项目ID
risk_levelYes风险等级
rule_contentYes规则内容
logic_operatorYes逻辑运算符,"AND","OR","REGEX"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.9/5.0
Behavior2/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, yet it discloses nothing about side effects: whether rule_name must be unique, whether the new rule is immediately used by scan jobs, permission requirements, or whether the returned object includes a rule ID. For a create/mutation operation this is a significant gap.

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?

A single front-loaded sentence with the verb and resource at the start; it contains no waste, though the trailing '等参数' is filler that adds no information.

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?

The schema fully documents the 8 required parameters, which covers the main invocation risk, but with no annotations and no output schema the description never says what a successful call returns (e.g., a rule ID) or how errors such as duplicate names surface. Adequate at the level of the input contract, incomplete at the level of behavior.

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%, so every one of the 10 parameters is already documented in the schema, including the two enums for category and rule_type. The description only restates four field names and adds '等参数', giving no format or validation detail beyond the schema, so the baseline of 3 applies.

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 names a specific verb (create/创建) and resource (custom sensitive data detection rule/自定义的敏感数据识别规则), and enumerates the leading inputs (rule name, rule type, risk level, min match). It does not distinguish itself from close siblings such as dsc__AddRuleGroup or dsc__ChangeRule, so it stops short 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?

There is no when-to-use guidance, no prerequisites, and no mention of alternatives such as AddRuleGroup (grouping) or ChangeRule (editing an existing rule). The agent must infer all routing decisions from the tool name alone.

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