Skip to main content
Glama
ihwooMil

Long-Term Memory

by ihwooMil

policy_decide

Evaluate a user message to determine the memory action (SAVE, SKIP, or RETRIEVE) via a reinforcement learning policy, returning reasoning and optionally saving or retrieving memories.

Instructions

Ask the RL policy to decide what memory action to take for a user message.

Returns the policy's decision (SAVE/SKIP/RETRIEVE) with reasoning. If SAVE: also returns the saved memory entry. If RETRIEVE: also returns retrieved memories.

Args: user_message: The user's message to evaluate. turn_id: Optional turn identifier.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
turn_idNo
user_messageYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

The description discloses the decision output and conditional returns (SAVE/SKIP/RETRIEVE with reasoning, and saved/retrieved memories). However, it is ambiguous whether the tool actually saves or retrieves memory or simply returns the decision; the phrase 'also returns the saved memory entry' could imply side effects. Since no annotations are provided, the description carries the full burden of transparency and this ambiguity is a gap.

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 concise, with a clear first sentence stating the purpose. The return behavior is organized into conditional statements, making it easy to scan. No extraneous information is included.

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?

The description covers the tool's core purpose, inputs, and expected outputs. However, it leaves ambiguity about whether the tool has side effects (e.g., saving or retrieving memory) or purely returns a decision. Given the existence of sibling tools that perform actions, clarifying this would improve completeness. Overall, it is mostly complete for a decision-making tool.

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?

The input schema fully covers both parameters (user_message and turn_id), and the description provides minimal additional context: user_message is the message to evaluate and turn_id is an optional identifier. This meets the baseline for full schema coverage but does not add significant semantic depth beyond the schema.

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's function: asking the RL policy to decide a memory action for a user message. It specifies the verb 'ask' and the resource 'RL policy', and the outcome is a decision (SAVE/SKIP/RETRIEVE). This distinguishes it from sibling tools like memory_save or memory_search which execute actions rather than decide them.

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

Usage Guidelines2/5

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

The description does not provide guidance on when to use this tool versus the sibling tools. It does not mention alternatives or conditions for selection, such as 'use when you need to decide before executing memory_save'. The 'when' context is left implicit.

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

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/ihwooMil/long-term-memory'

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