Overview
This guide provides practical examples for common use cases with the MCP Gateway. All examples use standard MCP tool calling format.Example 1: Discovering and Executing an Action
Step 1: Discover Available Actions
Step 2: Get Full Action Details
Step 3: Execute the Action
Example 2: Searching for Actions
Search for Message-Related Actions
Get Details and Execute
After finding the right action, get full details and execute:Example 3: Batch Execution
Reading Multiple Emails
Example 4: Parallel Multi-Action Execution
Fetching Data from Multiple Sources
Example 5: Using Response Projection
Extract Specific Fields from Large Response
Filter and Aggregate Data
Example 6: Agent Mode - Getting Instructions
Retrieve Agent Instructions
Example 7: Agent Mode - Listing Applications
Get All Apps with Action Summaries
Example 8: Agent Mode - Context Management
List All Contexts
Search for Specific Contexts
Get Context Details
Create New Context
Example 9: Complete Workflow
Multi-Step Workflow Example
Step 1: Discover available actionsBest Practices
1. Use Summary Mode for Discovery
Always start withdetail_level: "summary" when exploring actions to save tokens and improve performance.
2. Get Full Schemas Before Execution
Always calllist_actions with specific operationIds to get complete parameter specifications before executing actions.
3. Use Batch Operations for Efficiency
When executing the same action multiple times, userun_action_batch instead of multiple run_action calls.
4. Leverage Parallel Execution
Userun_multi_actions when you need to fetch data from multiple sources simultaneously.
5. Use Response Projection for Large Data
Applyresponse_projection to reduce response size when you only need specific fields from large responses.
Common Patterns
Pattern: Discover → Get Details → Execute
- Use
list_actionswithdetail_level: "summary"to discover - Use
list_actionswithoperationIdsto get full schemas - Use
run_actionwith complete parameters to execute
Pattern: Search → Execute
- Use
search_actionsto find relevant actions - Get full details for selected actions
- Execute with proper parameters
Pattern: Batch Processing
- Identify the action to execute multiple times
- Prepare
base_contextwith shared parameters - Prepare
batch_contextwith varying parameters - Execute with
run_action_batch
