Skip to main content

Crate sim_lib_mcp

Crate sim_lib_mcp 

Source
Expand description

Library-only MCP surface projection for SIM.

This crate projects native browse Cards and optional SkillCard records into redacted McpSurfaceCard rows. Routing, transport, and callable execution are implemented by later MCP layers.

Structs§

McpAnnotation
Key/value annotation attached to a surface row, with a visibility scope.
McpExportFacet
Describes how a native card subject is exported onto the MCP surface.
McpFunction
Runtime callable object that dispatches one MCP method.
McpLib
Loadable library that registers the MCP method functions in a runtime.
McpNativeCard
Native browse card describing one runtime subject and its MCP facets.
McpProfile
Allow/deny filter that decides which surface rows reach a client.
McpRouter
Dispatches MCP request/notification envelopes against a session.
McpSession
Mutable per-connection MCP session state.
McpSurfaceCard
A single redacted MCP surface row projected from a native or skill card.

Enums§

McpAnnotationVisibility
Whether an McpAnnotation is exposed to clients or kept internal.
McpStreamPolicy
Streaming behavior a surface row advertises to clients.
McpSurfaceRole
MCP role that a projected surface row plays for a client.
McpSurfaceSource
Origin record that a projected McpSurfaceCard was derived from.
NativeFacet
A facet attached to an McpNativeCard.

Constants§

MCP_LIB_ID
Stable identifier under which this library registers in the runtime.

Functions§

call_symbol
Returns the mcp/call function symbol.
get_prompt_symbol
Returns the mcp/get-prompt function symbol.
handle_symbol
Returns the mcp/handle function symbol.
health_symbol
Returns the mcp/health function symbol.
initialize_symbol
Returns the mcp/initialize function symbol.
install_mcp_lib
Installs McpLib into cx, loading it once if not already present.
manifest_name
Returns the symbol under which McpLib is registered.
mcp_export_facet_name
Returns the facet name used to mark MCP exports on native cards.
mcp_export_operation_symbol
Returns the operation symbol identifying the MCP export operation.
mcp_exports
Returns the export records for every MCP method function.
mcp_prompts_get_capability
Returns the capability gating prompts/get execution.
mcp_resources_read_capability
Returns the capability gating resources/read execution.
mcp_tools_call_capability
Returns the capability gating tools/call execution.
native_surface_rows
Projects the MCP export facets of cards into surface rows.
project_mcp_surface
Projects native cards plus (when the skill feature is on) skill cards into surface rows filtered by profile.
project_native_surface
Projects native cards into surface rows filtered by profile.
project_surface_rows
Filters rows through profile and deduplicates by name, returning the rows sorted by name; errors on a name collision among allowed rows.
prompts_symbol
Returns the mcp/prompts function symbol.
read_symbol
Returns the mcp/read function symbol.
resources_symbol
Returns the mcp/resources function symbol.
shape_to_json_schema
Converts a SIM shape into a JSON-Schema Expr map for MCP clients.
stable_mcp_name
Derives a stable, ASCII MCP name from a runtime symbol.
tools_symbol
Returns the mcp/tools function symbol.

Type Aliases§

RouterReply
Optional single reply envelope produced by routing one request.