Prompts and Resources
Understanding MCP Resources and Prompts - advanced features that help AI agents discover and learn.
What Are MCP Resources?
Resources are named, readable content that AI agents can discover and browse directly, similar to how humans browse documentation.
Key Differences from Tools
| Feature | Tools | Resources |
|---|---|---|
| Purpose | Execute commands | Read documentation |
| Input | Required parameters | Resource URI |
| Output | Command results | Document content |
| Use Case | Actions | Learning and discovery |
| Agent Behavior | Call with parameters | Browse and read |
How Agents Use Resources
Instead of searching or guessing:
Agent: "I want to import data but I'm not sure how"
Traditional (without resources):
- Agent calls hana_search_docs → finds import.md
- Agent guesses at parameters
- Agent tries import (may fail)
With Resources:
- Agent lists available resources
- Agent reads hana://docs/commands/import
- Agent learns correct usage
- Agent succeeds first timeAvailable Resources
Core Documentation Resources
Project Overview
hana://docs/overview- Project introduction and featureshana://docs/getting-started- Installation and setup guide
Connection and Setup
hana://docs/connection-guide- 7-step connection resolutionhana://docs/security- Security best practiceshana://docs/parameters- Standard parameter conventions
Architecture and Design
hana://docs/best-practices- Naming conventions and patternshana://docs/project-structure- Project folder organizationhana://docs/implementation- Technical implementation details
Category Guides
Organized by functionality:
hana://docs/categories/data-quality- Data validation, profiling, duplicateshana://docs/categories/performance- Performance analysis and tuninghana://docs/categories/data-operations- Import, export, synchana://docs/categories/inspection- Schema, table, view explorationhana://docs/categories/backup- Backup and recovery operationshana://docs/categories/security- User management and securityhana://docs/categories/btp- SAP BTP integration
Command Documentation
Individual command guides (available for all 150+ commands):
hana://docs/commands/import- Import command with exampleshana://docs/commands/export- Export command with exampleshana://docs/commands/dataValidator- Data validation guidehana://docs/commands/dataProfile- Data profiling guidehana://docs/commands/compareSchema- Schema comparison guidehana://docs/commands/[any-command]- Any command documentation
Each command resource includes:
- Detailed description
- All parameters explained
- Use cases and examples
- Common issues and solutions
- Related commands
Examples and Presets
hana://examples/import- 5 real-world import scenarioshana://examples/export- 3 export scenarioshana://examples/data-migration- Migration exampleshana://presets/safe-import- Safe import parameter templatehana://presets/quick-export- Quick export template
Workflow Resources
Pre-built task sequences:
hana://workflows/data-quality-check- Data quality check workflowhana://workflows/schema-migration- Schema migration workflowhana://workflows/performance-baseline- Performance baseline workflowhana://prompts- All available prompts and guide workflows
What Are MCP Prompts?
Prompts are guided conversation templates that help AI agents follow structured workflows for common tasks.
How Prompts Work
Prompts provide:
- Multi-step guidance - Step-by-step instructions
- Context preservation - Information carries through steps
- Best practices - Baked-in standards
- Error prevention - Validation and checks
- Learning support - Explanations and tips
Example Prompt Flow
User: "Help me safely import customer data"
System: Invokes import-data prompt
Prompt Steps:
📋 SAFE DATA IMPORT WORKFLOW
Step 1: Verify Source File
└─ Review file location and format
└─ Expected: CSV, Excel, or TSV file
Step 2: Inspect Target Table
└─ Examine table structure and constraints
└─ Required: INSERT privilege on table
Step 3: Preview Import (Dry Run)
└─ Run import in preview mode
└─ Shows what would be imported without actual changes
Step 4: Review Errors
└─ Check dry run results
└─ Decide: Proceed or fix data issues
Step 5: Execute Import
└─ Run actual import with selected options
└─ Progress tracking and error handling
Step 6: Validate Results
└─ Verify imported data
└─ Check count and sample records
└─ Run quality checks if neededAvailable Prompts
1. Explore Database (explore-database)
Duration: 15-30 minutes
Parameters:
schema(optional) - Specific schema to explore
Guided Steps:
- Verify database connection
- Check database version and system info
- List all schemas
- For each interesting schema:
- List tables
- Inspect some table structures
- Profile data quality if interested
- Summarize findings
Outcomes:
- Understanding of database structure
- Schema catalog
- Sample table definitions
- Data quality overview
2. Import Data Safely (import-data)
Duration: 20-40 minutes
Parameters:
filename(required) - File to importtable(optional) - Target tableschema(optional) - Target schema
Guided Steps:
- Verify file exists and is readable
- Inspect target table structure
- Preview import with dry-run
- Review and resolve errors
- Execute actual import (if approved)
- Validate imported data
- Generate import report
Outcomes:
- Successful safe import
- Error documentation
- Validation report
3. Troubleshoot Connection (troubleshoot-connection)
Duration: 20-40 minutes
Parameters: None required
Guided Steps:
- Check basic connectivity
- Verify credentials
- Test database connection
- Review user privileges
- Check schema access
- Diagnose specific issues
- Provide remediation steps
Outcomes:
- Diagnosed connection issue
- Recommended solutions
- Verified working connection
4. Validate Data Quality (validate-data-quality)
Duration: 30-60 minutes
Parameters:
table(required) - Table to validateschema(optional) - Target schema
Guided Steps:
- Profile the table (data distribution, nulls, etc.)
- Check for duplicate records
- Run data validator
- Analyze issues found
- Get recommendations
- Generate quality report
Outcomes:
- Data quality assessment
- Issue prioritization
- Remediation recommendations
5. Quick Start (quickstart)
Duration: 15-30 minutes
Parameters: None required
Perfect for: First-time users
Teaches:
hana_status- Verify connectionhana_version- Check database versionhana_schemas- List schemashana_tables- Explore tableshana_inspectTable- View table structurehana_healthCheck- System health
Outcomes:
- Understanding of basic commands
- Confidence in CLI usage
- Ready for advanced workflows
6. Export Data Safely (export-data)
Duration: 20-40 minutes
Parameters:
table(required) - Table to exportschema(optional) - Source schemaformat(optional) - CSV, Excel, or TSV
Guided Steps:
- Verify source table exists
- Check user has SELECT privilege
- Configure export format
- Preview export
- Execute export
- Verify export file
- Validate data integrity
Outcomes:
- Successfully exported file
- Export validation report
- Format verification
How Agents Use Resources and Prompts
Resource Discovery Workflow
1. Agent: "I need help with..."
2. System: Lists available resources
- hana://docs/getting-started
- hana://docs/commands/import
- hana://examples/import
- hana://workflows/data-migration
3. Agent: "Show me hana://docs/commands/import"
4. System: Reads and formats resource
- Title, description
- All parameters explained
- 5 usage scenarios
- Common issues
5. Agent: Confident in tool usage
6. Agent: Runs import commandPrompt-Guided Workflow
1. User: "Help me explore the database"
2. Agent: Invokes explore-database prompt
3. System: Returns structured guidance
Step 1: Verify connection
Step 2: Check version
Step 3: List schemas
...
4. Agent: Follows steps in order
- Runs each command
- Reviews results
- Proceeds to next step
5. System: Automatically suggests next steps
based on results
6. User: Gets clear understanding
of database structureCombining Resources and Prompts
Example: Learn Import by Resources, Execute by Prompt
Step 1: Resources (Learning)
- Agent reads hana://docs/commands/import
- Agent reviews hana://examples/import
- Agent understands options and best practices
Step 2: Prompt (Execution)
- Agent invokes "import-data" prompt
- Follows step-by-step guidance
- Ensures safe import
Step 3: Resources (Validation)
- If issues arise, agent reads hana://docs/troubleshooting
- Gets solutions from resources
- Applies fixesExample: Performance Tuning
Step 1: Understand
- Agent reads hana://docs/categories/performance
- Agent reviews hana://workflows/performance-baseline
- Agent learns approach
Step 2: Execute
- Agent invokes relevant workflow
- Gets structured guidance
- Collects metrics
Step 3: Interpret
- Agent reads performance results
- Gets recommendations
- Plans improvements
Step 4: Implement & Verify
- Agent follows hana_get_template("performance-tuning")
- Implements suggestions
- Re-measures and comparesBest Practices
For Agent Developers
Start with Resource Discovery
typescriptresources = await listResources() // Shows available learning materialUse Prompts for Complex Tasks
typescriptawait invokePrompt('import-data', { file: 'data.csv' }) // Provides structured guidanceChain Resources and Prompts
bashRead resource → Invoke prompt → Execute → ValidateLeverage Context
- Resources provide context
- Prompts build on context
- Results inform next steps
For Users (Best Practices)
Explore Resources First
- Get familiar with available help
- Learn best practices
- See examples
Use Prompts for New Tasks
- Follow guided workflows
- Avoid mistakes
- Learn as you work
Combine Both
- Resources for learning
- Prompts for execution
- Both for confidence
Benefits
For AI Agents
✅ Reduced tool calls - Read documentation instead of searching ✅ Better context - Full information available ✅ Guided workflows - Structured multi-step processes ✅ Error prevention - Validation steps built in ✅ Better outcomes - Follows best practices
For Users
✅ Self-service learning - Agents can learn from resources ✅ Structured guidance - Prompts prevent mistakes ✅ Quick results - Faster task completion ✅ Best practices - Guided toward optimal approaches ✅ Confidence - Clear steps and expectations
Future Enhancements
Potential additions to resources and prompts:
Video Tutorials
hana://videos/import-guidehana://videos/performance-tuning
Interactive Guides
- Better step feedback
- Real-time validation
- Progress tracking
Custom Resources
- User-created guides
- Organization-specific docs
- Custom workflows
Smart Recommendations
- Context-aware prompts
- Personalized workflows
- Adaptive guidance
Next Steps
- Discovery Tools - Finding commands by intent
- Advanced Features - Workflows and interpretation
- Implementation Phases - Technical details
- Main Documentation Index - Overview of all features