Skip to main content
Glama
mnemox-ai

TradeMemory Protocol

by mnemox-ai

recall_memories

Idempotent

Retrieve outcome-weighted trade memories ranked by context similarity and past performance; before a trade, view similar losses first to avoid repeating costly mistakes.

Instructions

Recall memories using OWM outcome-weighted scoring.

Queries episodic and semantic memories, scores them by outcome quality, context similarity, recency, confidence, and affective modulation. Returns ranked memories with score breakdown.

Use order="losses_first" right before placing a trade: losing trades taken in similar conditions rank first, and the current mood (a losing streak) no longer pushes them down.

Input Schema

NameRequiredDescriptionDefault
limitNoMax results (default 10)
orderNo"outcome" (default): better outcomes rank higher (by R multiple, where one was recorded), and at least 20% of the results are losses. "losses_first": every losing trade comes before anything else, the bigger losses in similar conditions first; the symbol's recent losing trades are searched as well as its recent trades. For a pre-trade check.outcome
symbolYesTrading instrument (e.g. "XAUUSD")
use_hybridNoIf True (default), enable vector + OWM hybrid scoring when an embedding backend is available. Falls back to pure OWM silently when sentence-transformers is not installed.
hybrid_alphaNoVector vs OWM blend weight [0..1] when hybrid is active. 0.0 = pure OWM, 1.0 = pure vector. Default 0.3 (OWM-dominant).
memory_typesNoTypes to query (default: ["episodic", "semantic"])
strategy_nameNoOptional strategy filter
context_atr_d1NoCurrent ATR(14) on D1 in dollars
context_regimeNoCurrent market regime (trending_up/trending_down/ranging/volatile)
market_contextYesCurrent market conditions to match against

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.6
    • addedInput schema / properties / order
      Added value: +{
      +  "default": "outcome",
      +  "description": "\"outcome\" (default): better outcomes rank higher (by R\nmultiple, where one was recorded), and at least 20% of the\nresults are losses. \"losses_first\": every losing trade comes\nbefore anything else, the bigger losses in similar conditions\nfirst; the symbol's recent losing trades are searched as well as\nits recent trades. For a pre-trade check.",
      +  "type": "string"
      +}
  2. Changed9 schema fields changedv0.5.4
    • addedInput schema / properties / context_atr_d1 / description
      Added value: +"Current ATR(14) on D1 in dollars"
    • addedInput schema / properties / context_regime / description
      Added value: +"Current market regime (trending_up/trending_down/ranging/volatile)"
    • addedInput schema / properties / hybrid_alpha
      Added value: +{
      +  "default": 0.3,
      +  "description": "Vector vs OWM blend weight [0..1] when hybrid is active.\n0.0 = pure OWM, 1.0 = pure vector. Default 0.3 (OWM-dominant).",
      +  "type": "number"
      +}
    • addedInput schema / properties / limit / description
      Added value: +"Max results (default 10)"
    • addedInput schema / properties / market_context / description
      Added value: +"Current market conditions to match against"
    • addedInput schema / properties / memory_types / description
      Added value: +"Types to query (default: [\"episodic\", \"semantic\"])"
    • addedInput schema / properties / strategy_name / description
      Added value: +"Optional strategy filter"
    • addedInput schema / properties / symbol / description
      Added value: +"Trading instrument (e.g. \"XAUUSD\")"
    • addedInput schema / properties / use_hybrid
      Added value: +{
      +  "default": true,
      +  "description": "If True (default), enable vector + OWM hybrid scoring when\nan embedding backend is available. Falls back to pure OWM silently\nwhen sentence-transformers is not installed.",
      +  "type": "boolean"
      +}
  3. First observedv0.4.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations cover the safety profile, and the description adds real behavioral context: what signals drive ranking (outcome quality, context similarity, recency, confidence, affective modulation) and the effect of losses_first on mood suppression. It does not explain why readOnlyHint is false or whether a recall mutates any state, which leaves one gap.

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?

Front-loads the core operation in the first line, then scoring behavior, then the one actionable usage tip. Four short sentences with little waste, though the scoring-dimension list is partially jargon that the schema also implies.

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?

Output schema exists so return values need not be described, and annotations cover safety. The description supplies the scoring model and the key usage mode, which is sufficient for a 10-param read tool, though it omits any note on the readOnlyHint=false state change.

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 the schema already documents all 10 parameters including order, use_hybrid, and hybrid_alpha. The description restates the order="losses_first" behavior but adds no syntax or semantics beyond what the schema already states, matching the baseline of 3.

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 and resource ('Recall memories') and elaborates the retrieval+scoring pipeline (episodic/semantic, OWM scoring, ranked results with score breakdown). This clearly separates it from write-side siblings like remember_trade or aggregation tools like get_strategy_performance. It stops short of naming any sibling explicitly, so it lands at 4 rather than 5.

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?

Gives a concrete, situational directive: use order="losses_first" right before placing a trade, with the reason (losing trades in similar conditions rank first, mood no longer suppresses them). It does not say when NOT to use this tool or name alternative memory/analysis tools, so it is clear context but not full when/when-not guidance.

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