Skip to main content
Glama

pasm_semantic

Retrieves memories by meaning, explains why each matched. Use as a fallback when exact recall fails, with retention-based weighting for older memories.

Instructions

语义检索(认知层):换一种说法也能命中,并解释每条为什么被召回。适合当 pasm_recall 检索不到时的第二步 —— 它走向量 + 中文同义扩展,并按'记忆保留度'加权(很久没被唤起的记忆会自然降权)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo返回条数,默认 5
queryYes检索词(可以是完整的问句)
agent_idNodefault
use_focusNo是否按当前焦点加权,默认 true
use_forgettingNo是否启用遗忘曲线,默认 true

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

While there are no annotations, the description does disclose key behavioral traits: it uses vector search plus Chinese synonym expansion, and it weights by 'memory retention' with natural forgetting. However, it doesn't mention whether results are read-only or any side effects, but given the nature of retrieval, these are less critical.

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

Conciseness4/5

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

The description is compact and front-loaded with purpose and usage context. It avoids unnecessary details and fits in a few lines. Minor redundancy with '认知层' but overall efficient.

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?

Given the complexity is moderate and the schema covers most parameters, the description provides enough for an agent to understand when and how to use it. It lacks details on return format, but no output schema exists, so this is acceptable. The description covers the essential usage scenario.

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 80%, so the schema already documents most parameters. The description adds context about weighting by retention and forgetting, which relates to the use_forgetting parameter, adding slight extra meaning beyond the schema's brief descriptions.

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 clearly states the tool performs semantic retrieval with synonym expansion and explains why results are returned. It distinguishes itself from pasm_recall by mentioning it's a fallback when the latter fails, and it highlights the cognitive layer aspect.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use this tool: as the second step when pasm_recall fails. It contrasts this with pasm_recall and implies alternatives, giving clear context for selection.

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