Skip to main content
Glama
mnemox-ai

TradeMemory Protocol

by mnemox-ai

Remember Trade

remember_trade

Save completed trades to outcome-weighted memory and automatically update semantic, procedural, and affective models for future strategy and position sizing.

Instructions

Store a trade into OWM multi-layer memory with automatic updates.

Writes to episodic memory and automatically updates semantic (Bayesian), procedural (running averages + hold time + Kelly), and affective (EWMA confidence/streaks). Also writes to trade_records for backward compatibility.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pnlYesProfit/loss in account currency
pnl_rNoP&L as R-multiple (risk units). Improves OWM scoring quality.
symbolYesTrading instrument (e.g. "XAUUSD")
trade_idNoOptional custom ID. Auto-generated if omitted.
directionYes"long" or "short"
timestampNoISO format timestamp. Defaults to now (UTC).
confidenceNoAgent confidence level 0-1 (default 0.5)
exit_priceYesExit price of the trade
reflectionNoLessons learned from this trade
entry_priceYesEntry price of the trade
strategy_nameYesStrategy used (e.g. "VolBreakout")
context_atr_d1NoATR(14) on D1 in dollars
context_regimeNoMarket regime (trending_up/trending_down/ranging/volatile)
exit_timestampNoISO format exit time. Used to compute hold duration.
market_contextYesDescription of market conditions
entry_timestampNoISO format entry time. Used to compute hold duration.
max_adverse_excursionNoMaximum adverse excursion during the trade

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed17 schema fields changedv0.5.4
    • addedInput schema / properties / confidence / description
      Added value: +"Agent confidence level 0-1 (default 0.5)"
    • addedInput schema / properties / context_atr_d1 / description
      Added value: +"ATR(14) on D1 in dollars"
    • addedInput schema / properties / context_regime / description
      Added value: +"Market regime (trending_up/trending_down/ranging/volatile)"
    • addedInput schema / properties / direction / description
      Added value: +"\"long\" or \"short\""
    • addedInput schema / properties / entry_price / description
      Added value: +"Entry price of the trade"
    • addedInput schema / properties / entry_timestamp
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "ISO format entry time. Used to compute hold duration."
      +}
    • addedInput schema / properties / exit_price / description
      Added value: +"Exit price of the trade"
    • addedInput schema / properties / exit_timestamp
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "ISO format exit time. Used to compute hold duration."
      +}
    • addedInput schema / properties / market_context / description
      Added value: +"Description of market conditions"
    • addedInput schema / properties / max_adverse_excursion / description
      Added value: +"Maximum adverse excursion during the trade"
    • addedInput schema / properties / pnl / description
      Added value: +"Profit/loss in account currency"
    • addedInput schema / properties / pnl_r / description
      Added value: +"P&L as R-multiple (risk units). Improves OWM scoring quality."
    • addedInput schema / properties / reflection / description
      Added value: +"Lessons learned from this trade"
    • addedInput schema / properties / strategy_name / description
      Added value: +"Strategy used (e.g. \"VolBreakout\")"
    • addedInput schema / properties / symbol / description
      Added value: +"Trading instrument (e.g. \"XAUUSD\")"
    • addedInput schema / properties / timestamp / description
      Added value: +"ISO format timestamp. Defaults to now (UTC)."
    • addedInput schema / properties / trade_id / description
      Added value: +"Optional custom ID. Auto-generated if omitted."
  2. First observedv0.4.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations declare non-readonly, non-idempotent, non-destructive, and the description adds substantial detail: which memory layers get written, that semantic updates use Bayesian methods, procedural uses running averages/Kelly, and affective uses EWMA. It also discloses backward-compat write to trade_records. This is real behavioral context beyond what annotations provide.

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?

Four sentences, front-loaded with the main action and then detailing the memory layers. No wasted words; each clause adds information about write targets.

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 tool's complexity (17 params, multi-layer memory writes) and the presence of an output schema, the description covers the essential write behavior. It omits return-value details but those are in the output schema, which is acceptable.

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 17 parameters are documented in the schema. The description doesn't mention any specific parameter semantics (e.g., how confidence or pnl_r feed into scoring), so it's baseline 3 for a fully-covered schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (store) and resource (trade) and clarifies the target system (OWM multi-layer memory). It doesn't explicitly differentiate from sibling recall_memories or get_trade_reflection, but the write-vs-read distinction is implied by 'Store'.

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?

No guidance on when to call this versus alternatives like recall_memories or how often trades should be recorded. The description explains mechanics of what gets updated but never says when an agent should invoke it.

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