Expand description
MCP resource handlers.
Provides resource access for the Model Context Protocol. Resources are accessed via URN scheme:
§Help Resources
subcog://help- Help indexsubcog://help/{topic}- Topic-specific help
§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 ID
§Search & Topic Resources
subcog://search/{query}- Search memories with a querysubcog://topics- List all indexed topicssubcog://topics/{topic}- Get memories for a specific topic
§Domain-Scoped Resources (future)
subcog://project/_- Project-scoped memories onlysubcog://org/{org}/_- Organization-scoped memoriessubcog://global/_- Global memories
For advanced filtering and discovery, use the subcog_browse prompt
which supports filtering 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).
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.