Skip to main content
Glama

检查操作风险

check_risk

Detects potential risks in SQL statements, shell commands, and API calls, then grades severity based on context and environment to distinguish safe, scoped operations from destructive ones.

Instructions

检测代码或操作指令中的潜在风险,支持 SQL、Shell 命令、API 调用等多种输入类型。能够根据上下文分析操作的影响范围和风险等级。

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": {
      "code": "<code>"
    },
    "name": "check_risk"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes要检查的代码或操作指令
languageNo代码语言类型(sql/shell/api/auto,默认自动检测)auto

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations exist, so the description carries the full behavioral burden. It discloses that analysis is context-aware and reports both 影响范围 (impact scope) and 风险等级 (risk level), which is useful. However, it omits whether the check is read-only/safe, latency or rate characteristics, and what the judgment actually returns, leaving meaningful gaps untouched.

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?

Two efficient sentences: the first front-loads what the tool does, the second adds the analysis capability. No filler or redundancy. It could be slightly sharper by folding in return-format detail rather than spending the second sentence on capability abstraction.

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?

For a two-parameter read-style check tool with no output schema and no annotations, the description is adequate but thin. Because no output schema exists, the description should explain what the risk-level and impact-scope results look like; it names them but does not describe their form, leaving a discovery gap.

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 both parameters are already documented in the schema, establishing a baseline of 3. The description's mention of SQL/Shell/API loosely maps to the language enum and confirms the code parameter's intent, but adds no format detail or edge-case guidance beyond the schema.

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?

States a specific verb and resource: 检测 (detect) potential risks in 代码或操作指令 (code or operation instructions). It also names supported input types (SQL, Shell, API), which clearly scopes the tool. There are no sibling tools to disambiguate against, so it falls short of a 5 only because sibling differentiation is impossible.

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

Usage Guidelines3/5

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

Usage context is implied ('detect risks before executing an operation') but never stated explicitly. There are no alternatives or exclusions to name (no siblings), yet it also fails to say when NOT to use it or what prerequisites an agent should satisfy before calling.

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