Module resources

Module resources 

Source
Expand description

MCP resource handlers.

Provides resource access for the Model Context Protocol. Resources are accessed via URN scheme:

§Help Resources

  • subcog://help - Help index
  • subcog://help/{topic} - Topic-specific help

§Memory Resources

  • subcog://_ - All memories across all domains
  • subcog://_/{namespace} - All memories in a namespace (e.g., subcog://_/learnings)
  • subcog://memory/{id} - Get a specific memory by ID

§Search & Topic Resources

  • subcog://search/{query} - Search memories with a query
  • subcog://topics - List all indexed topics
  • subcog://topics/{topic} - Get memories for a specific topic

§Domain-Scoped Resources (future)

  • subcog://project/_ - Project-scoped memories only
  • subcog://org/{org}/_ - Organization-scoped memories
  • subcog://global/_ - Global memories

For advanced filtering and discovery, use the subcog_browse prompt which supports filtering by namespace, tags, time, source, and status.

Structs§

HelpCategory
Help category definition.
ResourceContent
Content of an MCP resource.
ResourceDefinition
Definition of an MCP resource.
ResourceHandler
Handler for MCP resources (URN scheme).

Constants§

HELP_ADVANCED 🔒
HELP_CAPTURE 🔒
HELP_CONCEPTS 🔒
HELP_SEARCH 🔒
HELP_SETUP 🔒
HELP_TROUBLESHOOTING 🔒
HELP_WORKFLOWS 🔒

Functions§

decode_uri_component 🔒
Simple URL decoding for URI components.
format_memory_id_only 🔒
Formats a memory ID as a minimal JSON object.
format_memory_preview 🔒
Formats a memory as a JSON preview for topic listings.
truncate_content 🔒
Truncates content to a maximum length, breaking at word boundaries.