Chains
Predefined API sequences with conditional logic that provide dynamic context for intelligent agent execution
Setup
Adding a Chain to Your MCP Server
Navigate to MCP Server Configuration
Go to your MCP server configuration where you have already added APIs and Workflows.
Add New Chain
Click “Add Chain” to create a new business process sequence.
Configure Chain Details
Define your chain configuration with business goals and execution logic.
Chain Configuration Fields
Name
Name
Chain Name
Provide a clear, descriptive name for your chain that reflects the business process.
Examples:
- “Salesforce Lead Qualification Process”
- “Purchase Order Creation and Approval”
- “Customer Onboarding Workflow”
Goals
Goals
Business Objectives
Define what business goal this chain achieves for the agent.
Examples:
- “Qualify inbound leads and assign to appropriate sales rep”
- “Create purchase orders with proper approvals and vendor validation”
- “Onboard new customers across CRM and billing systems”
Steps
Steps
API Sequence & Conditions
Define the sequence of APIs to call with any conditional logic.
Example Structure:
- Step 1: Check if contact exists in CRM
- Step 2: If contact missing, create new contact
- Step 3: Create opportunity with contact validation
- Step 4: Assign to sales rep based on territory rules
Pre-check
Pre-check
Prerequisites Validation
Define any validations to check before running this sequence.
Examples:
- Verify user has permission to create opportunities
- Check if required fields are provided
- Validate data format and constraints
Success Condition
Success Condition
Success Actions
Define what to do when the chain executes successfully.
Examples:
- Return opportunity ID and details
- Send notification to sales rep
- Log successful execution for audit
Error Handling
Error Handling
Failure Recovery
Define what to do when the chain fails or encounters errors.
Examples:
- Retry with exponential backoff
- Rollback partial changes
- Escalate to manual review
- Return detailed error information
Chain vs Individual APIs
Business Process Sequences
- Predefined logical API sequences
- Include conditional logic and context
- Guide agents through complex workflows
- Share context across all API calls
- Handle business rule validation
Best for: Complex business processes requiring multiple steps
Business Process Sequences
- Predefined logical API sequences
- Include conditional logic and context
- Guide agents through complex workflows
- Share context across all API calls
- Handle business rule validation
Best for: Complex business processes requiring multiple steps
Atomic Operations
- Single-purpose API endpoints
- Direct system interactions
- Simple input/output operations
- Independent execution context
- Immediate response handling
Best for: Simple, standalone operations
Agent Decision Process
Chain Search
Agent analyzes user request:
- Searches available chains first
- Matches intent with chain capabilities
- Evaluates chain context requirements
Execution Choice
Agent selects execution method:
- Chain found: Execute predefined sequence
- No chain match: Use individual APIs
- Partial match: Execute relevant chain portions
Dynamic Execution
Agent follows chain guidance:
- Uses shared context for decisions
- Follows conditional logic paths
- Handles errors with retry mechanisms