Skip to main content

Module resources

Module resources 

Source
Expand description

MCP resource handlers.

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

§URN Format Specification

subcog://{domain}/{resource-type}[/{resource-id}]

§Components

ComponentFormatDescription
domain_ | project | user | org/{name}Scope for resolution
resource-typehelp | memory | search | topics | namespaces | summariesType of resource
resource-idalphanumeric with -, _Optional identifier

§Domain Scopes

DomainDescription
_Wildcard - all domains combined
projectCurrent project/repository (default)
userUser-specific (e.g., <user-data>/subcog/)
org/{name}Organization namespace

§Resource Types

§Help Resources

  • subcog://help - Help index with all available topics
  • subcog://help/{topic} - Topic-specific help (setup, concepts, capture, recall, etc.)

§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 its unique ID
  • subcog://project/decisions/{id} - Fully-qualified memory URN

§Search & Topic Resources

  • subcog://search/{query} - Search memories with a query (URL-encoded)
  • subcog://topics - List all indexed topics with memory counts
  • subcog://topics/{topic} - Get memories for a specific topic
  • subcog://namespaces - List all namespaces with descriptions and signal words

§Summary Resources

  • subcog://summaries - List all consolidated memory summaries
  • subcog://summaries/{id} - Get a specific summary with its source memories

§Domain-Scoped Resources

  • subcog://project/_ - Project-scoped memories only
  • subcog://org/{org}/_ - Organization-scoped memories
  • subcog://user/_ - User-scoped memories

§Examples

subcog://help/capture          # Get capture help
subcog://_/decisions           # All decisions across domains
subcog://project/learnings     # Project learnings only
subcog://memory/abc123         # Specific memory by ID
subcog://search/postgres       # Search for "postgres"
subcog://topics/authentication # Memories about authentication
subcog://summaries             # List all consolidated summaries
subcog://summaries/summary_123 # Get specific summary with sources

For advanced filtering and discovery, use subcog_recall with the filter argument to refine 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).

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.