Skip to main content
Glama

roster_upsert

Adds or edits a roster person, including tier, tone, relation, and permissions; supplied permissions replace existing ones, while omitting them preserves current permissions.

Instructions

加一个人或改他的定义。权限是覆盖式的:传了 perms 就整体替换,不传则保留原权限。

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": {
      "uin": "<uin>"
    },
    "name": "roster_upsert"
  }
}

Input Schema

NameRequiredDescriptionDefault
uinYesQQ 号
nameNo怎么称呼他
tierNoT0 自己人 / T1 熟人 / T2 路人(默认) / T3 雷区
toneNo跟他说话的语气提示
permsNo权限:dm 私聊 / qzone 空间 / group 群聊,只认 true
relationNo关系,例如「主人」「朋友」

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

There are no annotations, so the description carries the full burden, and it does disclose one genuinely non-obvious trait: perms is replacement-style, not a merge. It is silent on whether omitting other fields (name, tier, tone, relation) preserves or clears them, and says nothing about permissions or failure modes.

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 sentences: what it does, then the one surprising rule about perms. Both clauses are front-loaded with no filler, and the caution about perms is placed where a caller passing that field will see it.

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 mutation tool with no annotations, no output schema, six parameters, and a nested perms object, the definition covers the create-or-update semantics and the perms quirk but leaves the field-level merge behavior and return value unexplained. Adequate, but not complete for a write operation of this shape.

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 coverage is 100%, so all six parameters, including the enum and the perms object, are documented. The description adds only the replace-vs-retain semantics for perms, which is valuable but does not go beyond the baseline for the remaining five parameters.

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 states a specific verb and resource pair: add a roster entry or modify its definition, keyed implicitly by the required uin. It is clearly distinguishable from roster_remove, roster_list, and roster_get, though no sibling is named explicitly.

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?

Use is implied by the upsert framing (add new, or modify existing), but there is no guidance on when to prefer roster_allowlist or roster_note instead, and no prerequisites are stated. The reader can infer intent but must make the choice on their own.

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