Skip to main content
Glama

Add words to the user dictionary

add_user_words
Idempotent

Add domain words, names, jargon, or brands to the in-memory dictionary so later Chinese segmentation, POS tagging, and keyword extraction keep them whole. Changes reset on restart.

Instructions

Add domain words (names, jargon, brands) so later calls keep them whole.

The dictionary lives in this server process's memory only: it affects every later call to segment, pos_tag and extract_keywords, is shared by all clients of this process, and is gone after a restart. Nothing is written to disk.

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": {
      "words": "<words>"
    },
    "name": "add_user_words"
  }
}

Input Schema

NameRequiredDescriptionDefault
wordsYesWords to add.

Output Schema

NameRequiredDescriptionDefault
addedYesWords added to the in-memory dictionary.
countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say the call is non-read-only, non-destructive, and idempotent. The description adds the operational facts an agent actually needs: state is in-process memory, process-wide and shared across all clients, lost on restart, and never persisted to disk. That is exactly the extra context annotations cannot carry.

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 paragraphs, both front-loaded with the decisive information (what it does, then the lifetime/scope caveat). No filler, no redundant restatement of the title or schema fields.

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

Completeness5/5

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

With an output schema present, return values need not be described; parameters are fully documented in the schema. The one thing an agent could not infer — the ephemeral, process-shared lifetime of the dictionary — is covered explicitly, so nothing essential 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 coverage is 100%, so the schema already explains word, tag, and freq in detail. The description only adds a light characterization of suitable words (names, jargon, brands) and the 'keep them whole' rationale, which is marginal beyond what the schema provides. 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?

States a specific verb and resource ('Add domain words ... to the user dictionary') plus the intended outcome ('so later calls keep them whole'). It also names the affected sibling tools (segment, pos_tag, extract_keywords), which lets an agent place it relative to them without opening schemas.

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?

The use case is clear: call it ahead of segmentation/POS/keyword extraction for domain terms like names, jargon, and brands. There is no explicit when-not-to-use guidance, but with only one sibling family (read/extract tools) and no overlapping alternative for word registration, that gap costs little.

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