Discovery Tools and Guidance
Advanced tools for finding the right commands and understanding how to use them.
Command Recommendations (hana_recommend)
Get command suggestions based on what you want to do in plain English.
How It Works
The recommendation system matches your intent to commands using:
- Pattern Matching - Keywords you use
- Confidence Scoring - How well each command matches
- Example Parameters - Ready-to-use parameter templates
Basic Usage
Input: Natural language description of what you want to do
{
"intent": "find duplicate rows"
}Output: Top 5 matching commands with confidence and reasoning
{
"recommendations": [
{
"rank": 1,
"command": "duplicateDetection",
"confidence": "high",
"reasoning": "Designed specifically for finding duplicate records",
"exampleParameters": {
"table": "MY_TABLE",
"schema": "SALES",
"checkColumns": "EMAIL,PHONE"
}
},
{
"rank": 2,
"command": "dataProfile",
"confidence": "medium",
"reasoning": "Can identify duplicate patterns and distribution",
"exampleParameters": {
"table": "MY_TABLE",
"schema": "SALES"
}
}
]
}Common Intent Patterns
| Intent | Recommended Command |
|---|---|
| "List tables" | hana_tables, hana_schemas |
| "Find duplicates" | hana_duplicateDetection, hana_dataProfile |
| "Import data" | hana_import, hana_tableCopy, hana_dataSync |
| "Check data quality" | hana_dataValidator, hana_dataProfile |
| "Compare tables" | hana_compareData, hana_dataDiff |
| "Export data" | hana_export, hana_tableCopy |
| "Analyze performance" | hana_memoryAnalysis, hana_expensiveStatements |
| "Verify connection" | hana_status, hana_healthCheck |
| "Find missing columns" | hana_compareSchema, hana_inspectTable |
Smart Search (hana_smart_search)
Comprehensive search across all resources in the MCP Server.
Search Scope
The smart search looks across:
Commands (150+)
- Command names
- Descriptions
- Tags and categories
- Use cases
Workflows (20+)
- Multi-step task sequences
- Workflow names and descriptions
- Task phases
Examples (40+)
- Real-world scenarios
- Parameter examples
- Usage descriptions
Presets (30+)
- Parameter templates
- Preset names
- Use case descriptions
Usage Examples
Example 1: Find Import Commands
{
"query": "import CSV",
"scope": ["commands"],
"limit": 5
}Result:
{
"results": [
{
"type": "command",
"name": "import",
"relevance": 99,
"description": "Import data from CSV file",
"category": "data-operations"
},
{
"type": "command",
"name": "tableCopy",
"relevance": 78,
"description": "Copy table data, supports CSV format",
"category": "data-operations"
}
]
}Example 2: Find Data Quality Workflows
{
"query": "data quality validation",
"scope": ["workflows", "examples"],
"limit": 10
}Result:
{
"results": [
{
"type": "workflow",
"name": "data-quality-check",
"relevance": 95,
"phase": 1,
"steps": 5
},
{
"type": "example",
"command": "dataValidator",
"scenario": "Comprehensive Data Quality Check",
"relevance": 88
},
{
"type": "preset",
"command": "dataProfile",
"name": "quality-analysis",
"relevance": 82
}
]
}Ranking Algorithm
Results are scored based on:
- Exact match - 100 points
- Contains phrase - 50 points
- Contains all words - 30 points
- Per word match - 10 points
- Start of text bonus - 20 points
Results are sorted by total relevance score.
Quick Start Guide (hana_quickstart)
Perfect for users new to HANA CLI and the MCP Server.
The 6 Essential Commands
The quick start teaches you these commands in order:
hana_status- Verify connection and current userbash# Shows: # - Current user # - Connected database # - Current schema # - Version informationWhy: Confirms everything is set up correctly
hana_version- Check database versionbash# Shows HANA version and build numberWhy: Understand database capabilities
hana_schemas- List available schemasbash# Shows all schemas you can accessWhy: See available data sources
hana_tables- List tables in a schemabashhana_tables --schema SALES # Shows all tables in SALES schemaWhy: Find the data you need to work with
hana_inspectTable- View table structurebashhana_inspectTable --table CUSTOMERS --schema SALES # Shows columns, types, constraintsWhy: Understand what data is available
hana_healthCheck- Check system healthbash# Shows warnings and critical issuesWhy: Ensure database is running properly
Next Commands to Learn
After the quick start, explore:
- Data Analysis:
dataProfile,dataValidator,duplicateDetection - Data Operations:
import,export,dataSync - Schema Tools:
compareSchema,schemaClone,inspectTable - System Tools:
memoryAnalysis,expensiveStatements,recommendations
Conversation Templates (hana_conversation_templates)
Pre-built conversation flows for common tasks.
Available Templates
1. Data Exploration (15-30 minutes)
Goal: Understand database structure and data
Phases:
- Verify connection
- Check version and system info
- List available schemas
- Explore tables in key schemas
- Profile data quality
Commands:
hana_statushana_versionhana_systemInfohana_schemashana_tableshana_inspectTablehana_dataProfile
Tips:
- Start with SYSTEM schema for system tables
- Look for SALES, CUSTOMER, PRODUCT schemas
- Profile small tables first to understand data
2. Troubleshooting (20-40 minutes)
Goal: Diagnose and fix issues
Phases:
- Check system health
- Verify connectivity
- Test permissions
- Analyze resource usage
- Identify bottlenecks
Commands:
hana_healthCheckhana_statushana_inspectUserhana_memoryAnalysishana_expensiveStatementshana_recommendations
Tips:
- Run healthCheck first
- Check user roles and privileges
- Top queries often cause performance issues
- Review system alerts
3. Data Migration (30-60 minutes)
Goal: Move data between sources
Phases:
- Validate source schema
- Prepare target schema
- Export source data
- Import to target
- Verify migration
Commands:
hana_inspectTablehana_compareSchemahana_exporthana_importhana_compareDatahana_dataValidator
Tips:
- Always do dry-run first
- Start with small tables
- Validate after import
- Check data quality
4. Performance Tuning (30-60 minutes)
Goal: Optimize database performance
Phases:
- Establish baseline
- Identify hotspots
- Analyze indexes
- Review recommendations
- Implement improvements
Commands:
hana_memoryAnalysishana_tableHotspotshana_indexTesthana_recommendationshana_expensiveStatements
Tips:
- Large tables cause most issues
- Monitor memory usage trends
- Test index effectiveness
- Compare before/after metrics
5. Security Audit (20-40 minutes)
Goal: Review and secure database access
Phases:
- Inventory users
- Review roles and privileges
- Check inactive accounts
- Audit recent access
- Identify issues
Commands:
hana_usershana_inspectUserhana_roleshana_auditLoghana_replicationStatus
Tips:
- Document all user accounts
- Review DBA privileges
- Look for inactive accounts
- Check sensitive table access
Using a Template
Step 1: Get Template
{
"templateId": "data-exploration"
}Step 2: Review Steps
Each step includes:
- Purpose and goal
- Commands to run
- Expected outcomes
- Tips for success
Step 3: Follow Guided Workflow
- Run each command in sequence
- Review results
- Proceed to next step
- Skip optional steps if needed
Context-Aware Suggestions
After Command Execution
The system automatically suggests useful next steps:
After hana_status:
✅ Connected successfully
🔄 Suggested Next Steps:
1. Explore available schemas
→ Use: hana_schemas
→ Helps: Understand available data
2. Check system health
→ Use: hana_healthCheck
→ Helps: Verify system is stable
3. View version information
→ Use: hana_version
→ Helps: Understand capabilitiesAfter hana_tables:
✅ Listed 47 tables
🔄 Suggested Next Steps:
1. Inspect interesting table structures
→ Use: hana_inspectTable
→ Parameter: table="CUSTOMERS"
2. Profile table data quality
→ Use: hana_dataProfile
→ Parameter: table="CUSTOMERS"
3. Find duplicate rows
→ Use: hana_duplicateDetection
→ Parameter: table="CUSTOMERS"Output-Based Tips
Tips appear based on command results:
When import has errors:
⚠️ Import completed with 5 errors
📌 Suggested Actions:
• Try dryRun:true to preview before actual import
• Use skipWithErrors:true to continue on error
• Check error log for details
• Review data validation with dataValidatorWhen memory usage is high:
⚠️ Memory usage at 85% capacity
📌 Suggested Actions:
• Review expensiveStatements to find heavy queries
• Check tableHotspots for concentrated usage
• Implement recommendations
• Monitor memoryAnalysis trendsBest Practices for Discovery
1. Start with Recommendations
For any task, start with hana_recommend:
{
"intent": "what you want to do"
}This ensures you're using the right command.
2. Review Examples
Before running a command, check examples:
{
"command": "import"
}Learn from real-world usage patterns.
3. Use Parameter Presets
Let presets guide your parameters:
{
"command": "import"
}Get templates for different scenarios.
4. Follow Templates
For complex tasks, use conversation templates:
- Data exploration
- Troubleshooting
- Data migration
- Performance tuning
- Security audits
5. Interpret Results
Use result interpretation for insights:
{
"command": "dataProfile",
"result": "command output"
}Get AI-friendly analysis and recommendations.
Workflow Discovery
List Available Workflows
{
"action": "list"
}Returns all 20+ pre-built workflows.
Get Workflow Details
{
"workflowId": "data-quality-check"
}Returns complete steps, parameters, and examples.
Search Workflows
{
"query": "data validation",
"scope": "workflows"
}Find workflows matching your needs.
Execute Workflow
{
"action": "execute",
"workflowId": "data-quality-check",
"parameters": {
"schema": "SALES",
"table": "CUSTOMERS"
}
}Runs complete multi-step workflow.
Examples for Commands
Get Examples
{
"command": "import"
}Returns 5+ real-world scenarios:
- Quick CSV import
- Large file with error handling
- Streaming mode
- Bulk insert
- Error validation
What Examples Include
- Complete parameter set
- Scenario description
- Expected output
- Tips and best practices
- Common issues and solutions
Using Examples in Your Work
- Find relevant scenario
- Copy parameter template
- Customize for your data
- Run with dryRun first
- Execute when confident
Next Steps
- Advanced Features - Workflows and interpretation
- Features Overview - All available capabilities
- Prompts and Resources - MCP resources and prompts