Skip to main content
Glama

pasm_context

Retrieve read-only PASM cognitive context—relevant long-term memories, current emotion, personality, and available actions—to ground an AI agent's replies in remembered context.

Instructions

取 PASM 认知上下文(只读,不写记忆)。返回:与当前话题相关的长期记忆、当前情绪值、人格、可用动作池。这是把 PASM 接进大模型提示词的首选工具 —— 先调它,再把 recalled 里的内容当作'你确实记得的事'写进回复。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pasm_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
kNo最多返回几条记忆,默认 5
queryNo当前用户说的话/话题,用于检索相关记忆
digestNobrief 字段是否用认知摘要(默认 true,省 token 且不丢情绪/人格/显著度记忆;false 回滚到旧紧凑版)
agent_idNo智能体 id,默认 default。不同 id 记忆互相隔离default
digest_charsNo认知摘要字符预算,默认 80(≈38 tok,比旧 brief 更省且保住人格/显著度记忆);要连 hint 一起带可传 220(≈80 tok)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.1
    • addedInput schema / properties / digest
      Added value: +{
      +  "default": true,
      +  "description": "brief 字段是否用认知摘要(默认 true,省 token 且不丢情绪/人格/显著度记忆;false 回滚到旧紧凑版)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / digest_chars
      Added value: +{
      +  "default": 80,
      +  "description": "认知摘要字符预算,默认 80(≈38 tok,比旧 brief 更省且保住人格/显著度记忆);要连 hint 一起带可传 220(≈80 tok)",
      +  "type": "integer"
      +}
  2. First observedv0.2.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose the key behavioral traits: this is read-only and does not write memory, and the returned payload is relevant memories, emotion, persona, and an action pool. It does not cover failure modes, latency, or whether calling it mutates any internal state beyond memory (e.g. retrieval counters).

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 front-loaded with purpose, then return values, then the recommended call pattern, which is a sensible order. The bolded emphasis is slightly promotional, but each sentence contributes information and there is no filler.

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?

For a tool with five optional parameters and no output schema, the description does the important work of naming the return fields, partly compensating for the missing output schema. What remains thin is guidance on agent_id isolation and when to raise k, though both are covered by the schema descriptions.

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 description coverage is 100%, so all five parameters (k, query, digest, agent_id, digest_chars) are already documented in the schema, including defaults and the token tradeoff for digest_chars. The description adds no parameter-level detail of its own, so the baseline 3 is appropriate.

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 definition gives a specific verb and resource ('取 PASM 认知上下文'), enumerates what is returned (relevant long-term memories, current emotion value, persona, available action pool), and explicitly positions itself as the preferred entry point versus the other pasm_* tools, so an agent can distinguish it without opening a schema.

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 gives clear sequencing guidance: call this first, then incorporate the content of 'recalled' into the reply as things the model genuinely remembers. That is an explicit when-to-use rule. It never names a when-not condition or a specific alternative sibling such as pasm_recall or pasm_focus, so it falls short of a 5.

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