Skip to main content

Module schema_manager

Module schema_manager 

Source
Expand description

Schema manager: the top-level per-upstream view of an MCP server.

SchemaManager owns the canonical picture of what an upstream MCP server exposes — its capabilities, tools, resources, prompts — and how that picture changes over time. Other subsystems (sessions, tool hiding, custom tools, audit, cloud sync) read from it.

This module consists of:

  • SchemaVersion / SchemaVersionId: immutable, content-hashed snapshot of one method’s merged payload.
  • SchemaStore / MemorySchemaStore: pluggable persistence with a bounded in-memory default.
  • SchemaManager: ingest + query + stale tracking. Calls existing crate::protocol::schema helpers for pagination and diffing.
  • SchemaScanner: trait for active discovery (Standalone or Attached mode). No concrete implementation in this step.
  • ScanTrigger: enumerates the reasons a scan is initiated.

Structs§

MemorySchemaStore
In-memory SchemaStore backed by DashMap.
ScanResult
One method’s merged result payload from a scan.
SchemaManager
Top-level handle for one upstream MCP server’s schema view.
SchemaVersion
A single captured schema payload for one method on one upstream.
SchemaVersionId
Opaque, stable identifier for a SchemaVersion.

Enums§

ScanError
Errors that can arise during a scan.
ScanMode
How the scanner acquires an MCP session for discovery calls.
ScanTrigger
Why a scan was started.

Traits§

SchemaScanner
Drives active schema discovery against an upstream.
SchemaStore
Trait for schema version storage backends.