Skip to content

[FEATURE] TransplantFilter.min_salience is unreachable through the smem_transplant MCP tool #175

Description

@RobertSigmundsson

What happens

TransplantFilter supports a min_salience threshold, validated and everything:

# src/surreal_memory/engine/brain_transplant.py
min_salience: float = 0.0
...
if not 0.0 <= self.min_salience <= 1.0:
    raise ValueError(f"min_salience must be in [0.0, 1.0], got {self.min_salience}")

and it is applied where you would expect:

return float(fiber.get("salience", 0.0)) >= min_salience

But nothing in src/surreal_memory/mcp/ ever sets it — grep -rn min_salience src/surreal_memory/mcp/ returns nothing. So an agent calling smem_transplant through MCP always transplants at the default 0.0, i.e. unfiltered, with no way to ask for anything else.

Why it matters

Transplanting between brains is one of the operations where "everything" is rarely what you want — the usual intent is "bring across the material that actually earned its place, not the noise". The filter for exactly that exists and works; it is simply not reachable from the interface most callers use.

It is also a quiet gap rather than a loud one: the call succeeds, returns a plausible count, and nothing indicates that a threshold you might have wanted was never applied.

Suggestion

Expose min_salience on the smem_transplant tool schema and pass it through to TransplantFilter. Since the default is 0.0, adding it is backwards-compatible — existing callers keep today's behaviour.

I have not sent a patch because the schema is your interface and I did not want to guess at naming or at whether you would rather expose the whole TransplantFilter surface at once than add fields one at a time. Happy to send it in whichever shape you prefer.

Found on main at 4b133af1 (v3.5.1).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions