mcp

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(deps *Deps) *mcp.Server

func RunStdio

func RunStdio(ctx context.Context, s *mcp.Server) error

Types

type AddInput

type AddInput struct {
	Content  string         `json:"content" jsonschema:"The memory content to store"`
	Type     string         `json:"type" jsonschema:"Type of memory (fact conversation decision code_pattern correction)"`
	UserID   string         `json:"user_id,omitempty" jsonschema:"User scope identifier"`
	AgentID  string         `json:"agent_id,omitempty" jsonschema:"Agent scope identifier"`
	AppID    string         `json:"app_id,omitempty" jsonschema:"Application scope identifier"`
	RunID    string         `json:"run_id,omitempty" jsonschema:"Session/run scope identifier"`
	Metadata map[string]any `json:"metadata,omitempty" jsonschema:"Additional metadata as JSON object"`
}

type DeleteInput

type DeleteInput struct {
	ID string `json:"id" jsonschema:"The memory UUID to delete"`
}

type Deps

type Deps struct {
	Manager      *memory.Manager
	Consolidator *heartbeat.Consolidator
	Graph        *graph.InMemoryGraph
}

Deps bundles all dependencies for MCP handlers.

type GetInput

type GetInput struct {
	ID string `json:"id" jsonschema:"The memory UUID"`
}

type GraphAddInput

type GraphAddInput struct {
	Content  string `json:"content" jsonschema:"Text to extract entities and relations from"`
	MemoryID string `json:"memory_id,omitempty" jsonschema:"Associated memory ID for provenance tracking"`
}

type GraphNeighborsInput

type GraphNeighborsInput struct {
	EntityID string `json:"entity_id" jsonschema:"Entity ID to get neighbors for"`
	Depth    int    `json:"depth,omitempty" jsonschema:"Traversal depth (default 1, max 3)"`
}

type GraphSearchInput

type GraphSearchInput struct {
	Query string `json:"query" jsonschema:"Entity name or partial name to search for"`
	Limit int    `json:"limit,omitempty" jsonschema:"Max results (default 10)"`
}

type GraphStatsInput

type GraphStatsInput struct{}

type HeartbeatInput

type HeartbeatInput struct {
	UserID  string `json:"user_id,omitempty" jsonschema:"Scope consolidation to user"`
	AgentID string `json:"agent_id,omitempty" jsonschema:"Scope consolidation to agent"`
	AppID   string `json:"app_id,omitempty" jsonschema:"Scope consolidation to application"`
	RunID   string `json:"run_id,omitempty" jsonschema:"Scope consolidation to session/run"`
}

type ListInput

type ListInput struct {
	Type    string `json:"type,omitempty" jsonschema:"Filter by memory type"`
	UserID  string `json:"user_id,omitempty" jsonschema:"Filter by user scope"`
	AgentID string `json:"agent_id,omitempty" jsonschema:"Filter by agent scope"`
	AppID   string `json:"app_id,omitempty" jsonschema:"Filter by application scope"`
	RunID   string `json:"run_id,omitempty" jsonschema:"Filter by session/run scope"`
	Limit   int    `json:"limit,omitempty" jsonschema:"Max results (default 20)"`
	Offset  int    `json:"offset,omitempty" jsonschema:"Offset for pagination (default 0)"`
}

type SearchInput

type SearchInput struct {
	Query   string `json:"query" jsonschema:"Natural language search query"`
	Limit   int    `json:"limit,omitempty" jsonschema:"Maximum results to return (default 10)"`
	Type    string `json:"type,omitempty" jsonschema:"Filter by memory type"`
	UserID  string `json:"user_id,omitempty" jsonschema:"Filter by user scope"`
	AgentID string `json:"agent_id,omitempty" jsonschema:"Filter by agent scope"`
	AppID   string `json:"app_id,omitempty" jsonschema:"Filter by application scope"`
	RunID   string `json:"run_id,omitempty" jsonschema:"Filter by session/run scope"`
}

type StatsInput

type StatsInput struct {
	UserID  string `json:"user_id,omitempty" jsonschema:"Filter stats by user scope"`
	AgentID string `json:"agent_id,omitempty" jsonschema:"Filter stats by agent scope"`
	AppID   string `json:"app_id,omitempty" jsonschema:"Filter stats by application scope"`
}

type UpdateInput

type UpdateInput struct {
	ID       string         `json:"id" jsonschema:"The memory UUID to update"`
	Content  *string        `json:"content,omitempty" jsonschema:"New content (triggers re-embedding)"`
	Metadata map[string]any `json:"metadata,omitempty" jsonschema:"Metadata fields to merge"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL