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
| Component | Format | Description |
|---|---|---|
domain | _ | project | user | org/{name} | Scope for resolution |
resource-type | help | memory | search | topics | namespaces | summaries | Type of resource |
resource-id | alphanumeric with -, _ | Optional identifier |
§Domain Scopes
| Domain | Description |
|---|---|
_ | Wildcard - all domains combined |
project | Current project/repository (default) |
user | User-specific (e.g., <user-data>/subcog/) |
org/{name} | Organization namespace |
§Resource Types
§Help Resources
subcog://help- Help index with all available topicssubcog://help/{topic}- Topic-specific help (setup, concepts, capture, recall, etc.)
§Memory Resources
subcog://_- All memories across all domainssubcog://_/{namespace}- All memories in a namespace (e.g.,subcog://_/learnings)subcog://memory/{id}- Get a specific memory by its unique IDsubcog://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 countssubcog://topics/{topic}- Get memories for a specific topicsubcog://namespaces- List all namespaces with descriptions and signal words
§Summary Resources
subcog://summaries- List all consolidated memory summariessubcog://summaries/{id}- Get a specific summary with its source memories
§Domain-Scoped Resources
subcog://project/_- Project-scoped memories onlysubcog://org/{org}/_- Organization-scoped memoriessubcog://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 sourcesFor advanced filtering and discovery, use subcog_recall with the filter
argument to refine by namespace, tags, time, source, and status.
Structs§
- Help
Category - Help category definition.
- Resource
Content - Content of an MCP resource.
- Resource
Definition - Definition of an MCP resource.
- Resource
Handler - 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.