Skip to main content
Glama
gwq0514

cognitive-harness-mcp

by gwq0514

搜索用户认知记忆

cognitive_search
Read-onlyIdempotent

Search stored user memories by keyword, type, or life domain to retrieve relevant context before answering. Returns confidence-ranked entries with filtering and pagination.

Instructions

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

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

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 的空列表,不是错误

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo按内容类型过滤:fact/protocol/pragmatic/emotional/value/procedure/episodic
limitNo返回条数上限(默认 20,最大 100)
scopeNo按场景标签过滤(记忆的 scope 字段)
domainNo按生活域过滤:intimate/family/career/social/entertainment/health/finance/growth/basic_cognition/uncategorized
offsetNo分页偏移(默认 0)
keywordNo关键词,匹配记忆内容子串;不传则返回全量(配合 type/domain 过滤)
include_dynamicNo是否包含动态内容(默认 true)
Install Server

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description goes beyond annotations by disclosing confidence-based ordering, pagination, empty-result semantics (total=0 empty list is not an error), and the include_dynamic default. This is rich, non-obvious behavioral context.

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?

The description is well-organized into purpose, usage guidance, args, return shape, examples, and error handling—each section earns its place. Core purpose and usage are front-loaded, and the length is appropriate given the tool's complexity.

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?

The description documents all parameters, the exact return object structure, pagination behavior, example queries, and error semantics. Nothing an agent needs to invoke the tool correctly is missing, and the usage context is clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds value with natural-language examples mapping to keyword/domain parameters and restates all defaults and filters. However, there is a minor inconsistency: the Args list says 'emotion' while the schema enum uses 'emotional', which could mislead an agent.

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?

The description states a specific verb ('检索' = retrieve) and resource ('用户认知记忆'), and clarifies it returns relevant memory entries sorted by confidence with pagination. The '当对话涉及...' clause clearly distinguishes it from sibling write/update/forget tools. An agent can tell this is the retrieval tool among the siblings.

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 description explicitly lists trigger conditions (historical preferences, identity, ongoing projects, past events) and instructs to call this tool before answering to avoid guessing. It does not explicitly contrast with cognitive_list or cognitive_stats, so it misses a full when-not/alternative comparison, but the guidance is strong enough for correct selection.

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