Skip to main content
Glama
gwq0514

cognitive-harness-mcp

by gwq0514

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
COGNITIVE_MEMORY_PATHNo记忆 JSON 文件路径 (Memory JSON file path)~/.local/share/TeleAgent/memory/cognitive-memory.json

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
cognitive_searchA

按关键词、内容类型、生活域等条件检索用户认知记忆,返回与查询最相关的记忆条目(按置信度降序,支持分页)。

当对话涉及用户的历史偏好、身份背景、正在进行的项目、过往事件时,先调用此工具获取上下文再作答,避免凭猜测回复。

Args:

  • keyword (string, optional): 关键词,匹配记忆内容子串

  • type (string, optional): 内容类型过滤:fact/protocol/pragmatic/emotion/value/procedure/episodic

  • domain (string, optional): 生活域过滤:career/family/intimate/health/finance/entertainment/social/growth/basic_cognition/uncategorized

  • scope (array[string], optional): 场景标签过滤

  • include_dynamic (boolean, default true): 是否包含动态内容

  • limit (number, default 20): 返回条数上限

  • offset (number, default 0): 分页偏移

Returns(结构化): { "total": number, // 总命中数 "count": number, // 本次返回数 "offset": number, "has_more": boolean, // 是否还有更多 "entries": [{ id, type, content, domain, depth, confidence, rule_status, scope, timestamp, is_dynamic, pending_follow_up }] }

Examples:

  • "我记得用户说过他喜欢什么" -> keyword="喜欢"

  • "查一下用户工作相关的记忆" -> domain="career"

  • "用户对 PPT 有什么偏好" -> keyword="PPT"

Error:

  • 无匹配时返回 total=0 的空列表,不是错误

cognitive_writeA

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

规则类记忆(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 }

cognitive_updateA

更新一条已存在的记忆的部分字段。找不到该记忆时返回错误。

Args:

  • memory_id (string): 要更新的记忆 ID(可从 cognitive_search / cognitive_list 获取)

  • content / type / scope / confidence / domain / is_dynamic / pending_follow_up: 需要更新的字段

Returns: { "success": boolean, "memory": { 更新后的完整条目 } 或 null }

cognitive_forgetA

删除或降级一条用户记忆。默认 degrade(版本化降级):保留证据链、置信度减半,适用于"用户想法变了"的场景;delete 为彻底删除,不可恢复,请谨慎使用。

Args: memory_id: 要遗忘的记忆 ID mode: 'degrade'(默认,版本化降级)| 'delete'(彻底删除) reason: 遗忘原因,可选

Returns: { "success": boolean, "mode": string }

cognitive_summaryA

获取压缩的用户认知画像("印象"):交互偏好、核心画像、分域认知、已知事实、待跟进。适用于对话开始、或需要全面理解用户时。比逐条检索更高效。

Args: format: 'system_prompt'(默认,返回带引导语的注入片段)| 'markdown'(纯摘要)

Returns: { "summary": string, "memory_count": number }

cognitive_statsA

返回记忆存储的统计信息:总量、按类型分布、按领域分布、确认规则数。用于了解记忆覆盖面。

cognitive_listB

按时间倒序列出全部用户记忆(分页)。用于浏览记忆全貌。默认返回最近 20 条。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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