Expand description
MCP tool functions. Re-exported under post_cortex::mcp so
downstream callers writing custom MCP servers can embed them.
Modules§
- analysis
- Analysis, summaries, insights, and session statistics. Analysis, summaries, insights, and session statistics.
- error
- Typed error hierarchy for the MCP tool layer.
Typed error hierarchy for
post-cortex-mcp. - query
- Structured and keyword-based queries over session context. Structured and keyword-based queries over session context.
- schemas
- JSON Schema descriptors for every MCP tool. JSON Schema descriptors for every MCP tool.
- search
- Semantic and embedding-powered search across sessions. Semantic and embedding-powered search across sessions.
- session
- Session lifecycle: create, load, checkpoint, list, search, metadata. Session lifecycle: create, load, checkpoint, list, search, and metadata.
- update_
context - Helpers for recording context updates (single and bulk). MCP-side adapter for context-update writes.
- workspace
- Workspace CRUD and session-to-workspace membership. Workspace CRUD and session-to-workspace membership.
Structs§
- Context
Update Item - A single context update item accepted by the bulk-update tool.
- Entity
Item - Wire shape for an entity carried by an MCP
update_conversation_contextcall.entity_typeis a lowercase string from the closed set:technology,concept,problem,solution,decision,code_component. Unknown values fall back toconceptserver-side. - MCPTool
Result - Standardised result envelope for every MCP tool.
- Relation
Item - Wire shape for a relation between two named entities.
relation_typeis a lowercase string from the closed set:required_by,leads_to,related_to,conflicts_with,depends_on,implements,caused_by,solves. Unknown values cause the request to be rejected withInvalidArgument.
Enums§
- Context
Query - Typed query descriptors dispatched by
query::query_context. - Context
Response - Typed response payloads returned by
query::query_context. - Error
- Errors produced by the MCP tool layer.
- Interaction
- Typed interaction payloads matching MCP
interaction_typevalues.
Functions§
- add_
session_ to_ workspace - Add a session to a workspace with a specific role.
- bulk_
update_ conversation_ context - Record multiple context updates in a single batch via the canonical service. Items that fail translation or persistence are reported in the response payload — the rest still land, matching the legacy gRPC bulk semantics.
- create_
session_ checkpoint - Create a session checkpoint using the global memory system.
- create_
session_ checkpoint_ with_ system - Create a session checkpoint using an explicit memory system reference.
- create_
workspace - Create a new workspace with the given name and description.
- delete_
workspace - Delete a workspace (sessions are not removed).
- enable_
embeddings - Check whether the embeddings feature is available and return supported models.
- find_
related_ content - Find content related to a topic within a session (embeddings feature required).
- get_
all_ tool_ schemas - Return the full set of MCP tool JSON Schema descriptors.
- get_
entity_ importance_ analysis - Analyse entity importance with optional minimum-score and limit filters.
- get_
entity_ network_ view - Build a network view of entities and their relationships.
- get_
key_ decisions - Extract a timeline of key architectural and technical decisions.
- get_
key_ insights - Extract the top insights from a session ranked by importance.
- get_
memory_ system - Return the global memory system, lazily initialising it if needed.
- get_
memory_ system_ with_ config - Create a new memory system from the given configuration.
- get_
service - Return the cached canonical service, building it from the current
memory system if necessary. Both
update_conversation_contextandbulk_update_conversation_contextflow through this — no transport is allowed to bypass the canonical impl. - get_
session_ statistics - Return detailed statistics about a session’s size and activity.
- get_
structured_ summary - Generate a structured summary of the session with optional filtering.
- get_
tool_ catalog - Return a JSON catalog describing every available MCP tool and its usage.
- get_
vectorization_ stats - Retrieve vectorization statistics for the embedding index (embeddings feature required).
- get_
workspace - Retrieve workspace details including all associated sessions.
- inject_
memory_ system - Inject a pre-built memory system for daemon mode.
- list_
sessions - List all sessions via the global memory system.
- list_
sessions_ with_ storage - List all persisted sessions using a direct storage reference.
- list_
workspaces - List all workspaces with session counts.
- load_
session - Load a session by ID via the global memory system.
- load_
session_ checkpoint - Load a session checkpoint using the global memory system.
- load_
session_ checkpoint_ with_ system - Load a session from a previously saved checkpoint.
- load_
session_ with_ system - Load a session by ID using an explicit memory system reference.
- mark_
important - Mark a specific context update as important within a session.
- query_
conversation_ context - Execute a typed query against a session via the global memory system.
- query_
conversation_ context_ with_ system - Execute a typed query against a session using an explicit memory system reference.
- remove_
session_ from_ workspace - Remove a session from a workspace.
- search_
sessions - Search sessions by name or description.
- semantic_
search - Unified semantic search dispatcher supporting session, workspace, and global scopes.
- semantic_
search_ global - Search across all sessions using AI semantic understanding (embeddings feature required).
- semantic_
search_ session - Search within a single session using AI semantic understanding (embeddings feature required).
- update_
conversation_ context - Record a single context update via the canonical
PostCortexService::update_contextpath. - update_
session_ metadata - Update the name and/or description of a session.
- vectorize_
session - Manually trigger embedding vectorization for a session (embeddings feature required).
Type Aliases§
- McpResult
- Crate-level result alias.