Resources
Understanding and using MCP resources in SystemPrompt
MCP Resources
MCP resources are a fundamental feature of SystemPrompt that allow the AI to access and work with various types of data. Resources provide a structured way for the system to interact with documents, files, API responses, and other data sources.
What Are MCP Resources?
Resources in MCP are data objects that:
- Represent content from files, APIs, or other data sources
- Are identified by unique URIs (Uniform Resource Identifiers)
- Can contain text or binary data (like images)
- Have associated metadata like MIME types and descriptions
- Are exposed to the AI in a controlled, secure manner
Unlike MCP tools which perform actions, resources provide access to data that the AI can read and analyze to better assist you.
Resource Types in SystemPrompt
SystemPrompt supports various resource types across its integrations:
Document Resources
- Text Files: Access to plain text documents
Structured Data Resources
- Database Results: Query results from database systems
- JSON/XML Data: Structured data in standard formats
- Configuration Files: System and application settings
- Knowledge Base Entries: Structured information snippets
How Resources Work
Resources in SystemPrompt work through a process of discovery, access, and utilization:
- Resource Discovery: SystemPrompt identifies potentially relevant resources
- Resource Selection: You or the AI select which resources to use
- Resource Access: SystemPrompt securely retrieves the resource content
- Resource Processing: The AI analyzes and interprets the resource data
- Response Generation: The AI incorporates resource insights into its response
Resource URIs
Each resource is identified by a unique URI that follows this pattern:
Resource Permissions
SystemPrompt implements secure permission models for resource access:
- Authentication: Resources requiring authentication use secure OAuth flows
- Scope Limitations: Resources only expose what's necessary for operation
- User Control: You decide which resources SystemPrompt can access
- Transparency: Clear indications when resources are being used
Resource Examples
Here are some examples of how resources are used in SystemPrompt:
Reddit Analysis Example
When you ask:
SystemPrompt might use:
- Resource template:
reddit://r/{subreddit}/search?q={query}&t={time}&sort={sort}
- Instantiated as:
reddit://r/technology/search?q=ai+assistants&t=week&sort=top
- Returns a list of posts that the AI can analyze and summarize
Email Summarization Example
When you ask:
SystemPrompt might use:
- Resource template:
gmail://search?q={query}&after={date}
- Instantiated as:
gmail://search?q=important&after=2023-05-20
- Returns matching emails that the AI can read and summarize
Document Analysis Example
When you ask:
SystemPrompt might use:
- Resource template:
file:///{path}?query={search}
- Instantiated as:
file:///documents?query=annual+budget
- Returns matching files that the AI can analyze