Skip to main content
Glama

relation_set

Store or update a speaker's current facts, such as preferred name, preferences, agreements, or mood, keeping one current value per speaker and key while preserving value-change history.

Instructions

写下「现在的事实」:称呼、喜好、约定,或当前情绪(kind=emotion)。同一 (说话人, 键) 只有一条,值变化才留历史。

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": {
      "sessionId": "<sessionId>",
      "subjectId": "<subjectId>",
      "key": "<key>",
      "value": "<value>"
    },
    "name": "relation_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes属性名,如 称呼 / 忌口 / mood
kindNorelation
scopeNosession
valueYes
sessionIdYes
subjectIdYes说话人 id(平台号)
importanceNo

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?

With no annotations, the description carries the full burden and does disclose the most important write behavior: same (speaker, key) yields exactly one row, and history is written only when the value changes — an upsert/dedupe rule the agent could not otherwise know. It remains silent on what scope=identity vs session does, how importance is used, whether existing values are overwritten or merged, and what a call returns, which are material gaps for an unannotated mutation tool.

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 with no filler: the first frames what to store, the second states the uniqueness/history rule. It is front-loaded and every clause earns its place.

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 7-parameter, 4-required mutation tool with no annotations and no output schema, the definition covers the core write semantics but omits scope semantics and importance handling, which directly affect how a write lands. Adequate, but not sufficient for an agent to call it confidently in the identity-scoped case.

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 only 29% (only key and subjectId are described in-schema), so the description must compensate. It adds real meaning for two parameters — key examples (称呼/忌口/mood) and the kind=emotion value — but leaves scope (session/identity), importance (0-10), value, and sessionId entirely unexplained in both schema and prose.

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 opening clause gives a specific verb+resource: write down 'current facts' (称呼/喜好/约定/情绪). The parenthetical kind=emotion carve-out and the uniqueness rule sharpen what kind of record this is, though it never names or contrasts a sibling such as memory_record or relation_get, so the agent must infer the boundary.

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 is implied by the enumerated content types (称呼、喜好、约定、当前情绪), which tells the agent what belongs here, but there is no explicit when-to-use/when-not or routing to relation_history vs memory_record. The agent gets examples, not a decision rule.

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