Skip to content

MCP Tools

In addition to transparently proxying every upstream MCP tool, memtomem-stm provides 12 control tools that inspect and steer the proxy. Four model-facing tools are advertised by default; eight observability tools are opt-in for MCP advertisement.

Eight of the twelve tools are observability tools that are hidden from the MCP tool list by default to free up agent context. Set the env var MEMTOMEM_STM_ADVERTISE_OBSERVABILITY_TOOLS=true in your MCP client config to advertise them — they remain callable from Python tests / direct code paths either way.

CategoryAlways advertisedAdvertised when flag on
Always onstm_proxy_select_chunks, stm_proxy_read_more, stm_surfacing_feedback, stm_compression_feedback
Observabilitystm_proxy_stats, stm_proxy_health, stm_proxy_cache_clear, stm_surfacing_stats, stm_index_stats, stm_compression_stats, stm_progressive_stats, stm_tuning_recommendations

Token savings, cache hits, per-tool call history.

No parameters. (Observability — advertised only when advertise_observability_tools=true.)

Upstream connectivity and circuit breaker state.

No parameters. (Observability.)

Clear the response cache.

ParameterTypeRequiredDescription
serverstringNoScope to one upstream server
toolstringNoScope to one tool

(Observability.)

Pick specific sections from a selective / hybrid TOC returned by an earlier call.

ParameterTypeRequiredDescription
keystringYesTOC key from the previous response
sectionsstring[]YesSection ids to expand

Read the next chunk of a progressive response.

ParameterTypeRequiredDescription
keystringYesProgressive response key
offsetintegerYesByte offset to resume from
limitintegerNoChars to return this turn

Agents should split on the canonical PROGRESSIVE_FOOTER_TOKEN (\n---\n[progressive: chars=) rather than \n---\n alone — the latter collides with Markdown HR / YAML fences.

Rate surfaced memories so the auto-tuner can adjust thresholds.

ParameterTypeRequiredDescription
surfacing_idstringYesId from the surfacing footer
ratingstringYeshelpful / partially_helpful / not_relevant / already_known
memory_idstringNoSpecific memory the feedback refers to
ratingsobject[]NoBatched per-memory feedback, each with memory_id and rating

Aggregated surfacing metrics and feedback distribution. Reports events_total, distinct_tools, total_feedback, per-tool breakdown, rating distribution, helpfulness %, and a configurable recent tail.

ParameterTypeRequiredDescription
toolstringNoFilter by upstream tool name
sincestringNoISO-8601 timestamp (e.g. 2026-04-20T00:00:00) — restricts to events at or after this moment
limitintegerNoTail size for the Recent section (default 10; 0 hides it)

(Observability.)

STM-driven LTM write statistics for auto-indexing and extraction.

ParameterTypeRequiredDescription
toolstringNoFilter by upstream tool name

(Observability.)

Report missing information that compression dropped.

ParameterTypeRequiredDescription
serverstringYesUpstream server
toolstringYesTool name
missingstringYesWhat the agent needed but didn’t get
kindstringNoCategory hint
trace_idstringNoLangfuse trace id if available

Compression feedback counts per tool.

ParameterTypeRequiredDescription
toolstringNoFilter by tool name

(Observability.)

Per-response follow-up rate and coverage across all progressive-compressed calls. Each initial chunk and each follow-up stm_proxy_read_more appears as a row in progressive_reads; aggregates collapse per cache key, so a response with five follow-ups is weighted the same as one with none. Reports total reads, total responses, follow-up rate, avg chars served, avg total chars, avg coverage, and a per-tool breakdown.

ParameterTypeRequiredDescription
toolstringNoFilter by upstream tool name

(Observability — advertised only when advertise_observability_tools=true.)

STM-driven LTM write activity across both INDEX paths — auto_index_response (verbatim response → markdown chunk) and extract_and_store (response → LLM-extracted facts → markdown chunks). Mirror of stm_surfacing_stats for the write side; INDEX intentionally has no quality signal, so operators only see attempts (per-tool / per-path counts) and 4-label outcomes (stored / error / dedup_skip / extracted_zero_facts).

In the standalone mms server today, Stage 4 INDEX config is valid but inert because no FileIndexer engine is wired at startup. These counters are useful for library integrations and future server wiring, but enabling auto_index in stm_proxy.json does not currently write back to LTM from the standalone server.

ParameterTypeRequiredDescription
toolstringNoFilter by upstream tool name — the __total__ aggregate row is always included

(Observability — advertised only when advertise_observability_tools=true.)

Per-tool auto-tuner recommendations derived from recent feedback.

ParameterTypeRequiredDescription
since_hoursnumberNoTime window (default 24.0)
toolstringNoFilter by tool name

(Observability.)

Every tool from a registered upstream MCP server is proxied through STM using the pattern {prefix}__{tool}. For example:

Terminal window
mms add filesystem --command npx \
--args "-y @modelcontextprotocol/server-filesystem ~/projects" \
--prefix fs
# filesystem's read_file becomes fs__read_file

Proxied tool titles — the annotations.title field rendered by MCP tool-picker UIs (e.g. Claude Code’s /mcp) — are automatically prefixed with [{server}] for attribution: a filesystem server’s Read file tool appears as [filesystem] Read file. This is separate from the {prefix}__{tool} name used when calling the tool, and applies only when the upstream tool provides an annotations.title.

When the agent calls fs__read_file, the proxy runs the active pipeline: CLEAN → COMPRESS → SURFACE, with INDEX available only when an index engine is wired. It returns the compressed response plus any surfaced memories.

See Proactive Surfacing and Compression Strategies for mechanism details.