Skip to main content
Glama
gwq0514

cognitive-harness-mcp

by gwq0514

写入用户认知记忆

cognitive_write

Persist conversation insights as structured cognitive memories: facts, preferences, emotional patterns, values, and workflows. For rules, include causal context so future actions respect user intent.

Instructions

写入一条关于用户的认知记忆。适用于对话中出现的:客观事实、明确的偏好或规则、表达的真实含义、情绪模式、价值观、工作流程、重要事件。

规则类记忆(protocol/pragmatic)必须带因果说明:记录"为什么"而不是扁平结论。例如不要只记"用户发长段落时不要直接执行",而要记"用户长文+探讨意图=头脑风暴的邀请,直接动手会打断思路"。

Args:

  • type (string, 必填): 内容类型,见下方枚举说明

  • content (string 或 object): 记忆内容

  • domain (string, 可选): 主生活域

  • scope (string[], 可选): 场景标签

  • depth (string, 可选): D1-D4 抽象深度,默认 D1

  • confidence (number, 0-1, 默认 0.7): 置信度

  • is_dynamic (boolean, 默认 false): 动态内容

  • pending_follow_up (boolean, 默认 false): 待跟进

Returns: { "memory_id": string, // 新记忆 ID "type": string, "content": ..., "domain": string, "confidence": number }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes内容类型:fact(客观事实)/protocol(交互规则偏好)/pragmatic(表达真实含义)/emotional(情绪状态模式)/value(价值观)/procedure(工作流)/episodic(具体事件)
depthNo抽象深度:D1 事件 / D2 模式 / D3 规则 / D4 内核(默认 D1)
scopeNo适用场景标签(如 ["汇报","PPT"])
domainNo生活域(默认 uncategorized)
contentYes记忆内容。规则类(protocol/pragmatic)建议带因果说明,如"长文+探讨意图=头脑风暴邀请,直接动手会打断思路";事实类可为键值对象
confidenceNo置信度 0-1(默认 0.7)
is_dynamicNo是否为动态内容(如临时状态)
message_idNo来源消息 ID
conversation_idNo来源会话 ID
pending_follow_upNo是否有待跟进事项
Install Server

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already indicate this is a non-read-only, non-destructive write operation. The description adds some context, such as requiring causal explanations for rule-type memories and returning a new memory_id, but it does not disclose duplicate behavior, overwrite semantics, or permission requirements. This is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with its purpose and use cases, and the Args/Returns sections are scannable. However, the Args list largely duplicates the input schema, and the phrase '见下方枚举说明' points to an enumeration that is not actually present in the description text.

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?

It covers when to use the tool, rule-content guidance, several defaults, and an explicit return shape, which is valuable because no output schema exists. It does not explicitly mention using cognitive_update for edits or explain message_id/conversation_id, but the schema fills those gaps.

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 description is not required to explain every parameter. It mostly repeats the schema's parameter list and adds limited new meaning. The 'must' wording for causal explanations conflicts slightly with the schema's '建议' (recommended) wording, which reduces reliability.

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 opens with a specific action-resource pair ('写入一条关于用户的认知记忆') and enumerates the content categories it supports, making the tool's purpose clear. It does not explicitly contrast itself with siblings like cognitive_update or cognitive_forget, so it stops short of a 5.

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?

It explicitly states when to use the tool: for factual facts, preferences, rules, implied meanings, emotional patterns, values, workflows, and important events. It lacks exclusions or direct references to sibling tools for alternative operations, which prevents a top score.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gwq0514/cognitive-harness-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server