Skip to main content
Glama

拉黑用户

gwl_add_to_blacklist

Add a user to a group/class blacklist and send an in-site notification; requires owner or manage permission for that class.

Instructions

把一个用户加入组类黑名单(会同时给对方发一条站内通知)。 拉黑自己 400;已在名单里 409。需要该组类的管理角色(class_role=owner 或权限含 manage),否则 403。

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": {
      "cid": "<cid>",
      "username": "<username>"
    },
    "name": "gwl_add_to_blacklist"
  }
}

Input Schema

NameRequiredDescriptionDefault
cidYes组类标识(路径参数)。
reasonNo备注 / 附言(最多 200 个字符,上游超限返回 400)。
usernameYes要拉黑的用户登录名。

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, idempotentHint=false, destructiveHint=false, openWorldHint=true, so the safety surface is partly covered. The description still adds real value beyond them by disclosing the notification side effect on the target user and the 400/403/409 failure modes, which are not encoded anywhere in the schema.

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?

Two dense sentences: the action and its side effect first, then the constraint and error contract. No filler, and the most decision-relevant facts are front-loaded.

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

Completeness4/5

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

For a three-parameter mutation with full schema coverage, annotations, and an output schema, the description covers what's needed to call it correctly: permission requirement and the error cases. It is not quite complete on rollback/alternative behavior, but nothing critical is missing.

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%, with cid, username, and reason each documented including pattern, length bounds, and the upstream 400 on over-length reason. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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

Purpose5/5

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

Description states a specific verb+resource: adding a user to a group-class blacklist, plus the notable side effect of sending an in-site notification. Together with the name, it cleanly separates this tool from gwl_remove_from_blacklist and gwl_list_blacklist.

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

Usage Guidelines4/5

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

Usage context is explicit and operational: requires owner/manage role in that class, returns 400 for blacklisting yourself, 409 if already blacklisted. No explicit pointer to the removal tool as the undo path, so it stops short of full alternative routing.

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