Imagine an AI agent just granted admin-level access to a new contractor. The ticket said “Same permissions as the engineering team,” so the agent took the broadest reading of that and handed over production database access. It didn’t ask which permission set was meant. It assumed.
That single moment captures the gap between a demo and a production system. Demos tolerate ambiguity – a human is watching, ready to catch the wrong turn. Production can’t. The agent is acting on his own, and every assumption it makes is a decision no one reviewed.
Deploying agents into these complex, high-stakes workflows requires a structured framework that replaces autonomous guesswork with predictable execution.
MCP Connector latest release
When we launched the MuleSoft MCP Connector, it gave teams a reliable, standardized path to quickly build production-grade MCP servers on MuleSoft. As enterprises moved AI agents from prototypes into critical business processes, we identified key operational challenges across several industries regardless of use case: agents that guess instead of asking when context is missing, responses that require manual parsing before they’re usable, and prompts scattered across applications with no central control.
The latest release of the MCP Connector brings advanced features to address these workflow challenges directly: Elicitation, Structured Output, and Prompt Templates.
1. Elicitation: Ask instead of guessing
Every AI agent eventually hits a request it can’t fully resolve. The information it needs simply isn’t there, and what it does in that moment decides whether you can trust it in production.
Picture an invoice landing in your system. The vendor isn’t on your preferred supplier list, and the amount sits right at a threshold that could send it down one of two very different paths: a fast-track approval or a full compliance review. The agent has to pick one.
Today, it has two options – both of which are bad:
- Error out: “Missing parameters”. Work stops, frustrating the user
- Guess a default and proceed: A high-risk invoice sails past the review it needed. No one finds out until it’s in someone else’s queue
One wastes time. The other creates audit risk. Neither belongs in an unattended workflow.Most teams patch this by building custom clarification middleware – detect the gap, prompt the user, validate the reply, resume. It works. You also build and maintain it yourself, for every workflow, forever.
Elicitation makes asking the user native to the protocol. When context is missing, your MCP server pauses execution and requests exactly what it needs – typed and validated, not a free-text chat question:
Server requests:
- Field: supplier_classification
- Type: enum
- Options: [“New Supplier — Full Onboarding”; “Preferred – Fast Track”]
- Message: “This vendor isn’t in your approved list. How should we proceed?”
User selects: “New Supplier – Full Onboarding”
Server: Routes to the compliance workflow with full documentation.
The client renders this however it wants, eg via dropdown, buttons, inline form. The protocol guarantees a valid, typed answer comes back. The agent never guesses.
What this enables:
- Safety gates for irreversible actions: “This will override 340 existing allocations. Confirm?” – An explicit yes/no at the protocol level, not buried in a chat message hoping someone reads it
- No more custom clarification code: The middleware you’ve been building per-workflow is now a protocol primitive
See it in action:
2. Structured Output Support for enhanced data handling
Elicitation ensures the agent starts with clean inputs. But once it runs a tool, it has to deal with whatever comes back – and tool responses are rarely clean. A typical MCP tool returns a verbose payload: status narratives, protocol summaries, metadata, free-text commentary. Buried in those 800 tokens are the four fields your downstream system actually needs.
Extracting them reliably is harder than it looks:
- Custom parsing: You write extraction logic per tool, per integration. When the tool’s response format shifts, your parser breaks silently. The wrong data flows downstream. You’ll find out hours later
- LLM-based extraction: Burns tokens on every call and still can’t guarantee the shape. Close enough isn’t good enough when the output feeds a ledger or a regulatory submission
- Manual reshaping: Works until you have 20 tools and five consumers each expecting a different structure
Every approach puts the burden on you to dig the right data out of whatever the tool feels like returning. Structured Output flips this. You declare the shape you need up front. The connector delivers exactly that: a typed, validated object ready for the next step:
// Tool returns 800 tokens of clinical trial detail
// narratives, protocol history, site info, researcher commentary
// You declare only what you need:
Schema: {
trial_phase: string (enum),
patient_count: integer,
adverse_events: array,
principal_investigator: string
}
// You get exactly that – nothing more, nothing less:
{
trial_phase: "Phase 2",
patient_count: 1247,
adverse_events: [ {...}, {...} ],
principal_investigator: "Dr. Max"
}
That object drops straight into your business logic – route by patient_count, escalates when adverse_events crosses a threshold – no parsing layer in between.
What this uncovers:
- Extraction code disappears. The per-tool, per-integration parsing you maintain today becomes a schema declaration.
- Failures move to the right place. If data doesn’t match your schema, it fails at the MCP boundary — loudly, immediately — instead of slipping through and surfacing as a mystery downstream.
- Token costs drop. No LLM pass to reshape responses. Declare once, validate automatically
See this in action:
3. Prompt Templates for multi-agent behavioral consistency
The first two features make a single agent reliable. The third addresses what happens when you have many, because the way most teams manage prompts today doesn’t scale.
Consider a global travel company running AI agents for booking, dining, excursions, and loyalty support. Each agent has its own prompt, hardcoded into its own app, maintained by its own team. Four agents, four prompts, four places to look. Then, a normal week happens:
- Legal updates liability language
- Brand refreshes tone guidelines
- Compliance adds a new disclosure requirement
Each change has to be applied to every prompt, in every app, then tested, redeployed, and multiplied across regions, languages, and channels. That isn’t governance. It’s digging through applications hoping you’ve found every place the old language still lives. Every copy you miss is a copy now out of compliance. The root problem is the prompt. The thing that actually directs how the agent behaves is treated as code buried inside each app, not as a managed asset.
Prompt Templates make your MCP server the single source of truth. Domain experts define each promptly once. Agents pull it dynamically at runtime:
Available templates:
- booking assistant: (brand voice + booking policies + upsell rules)
- dining concierge: (dietary handling + reservation protocols)
- excursion planner: (safety disclosures + cancellation terms)
- loyalty support: (tier benefits + redemption logic)
Legal updates the disclosure language in one place – every agent using that MCP server reflects the change instantly. No redeployment. No version drift. No hunting for the app still running last quarter’s compliance text.
What this uncovers:
- Ownership stays with the experts. Compliance owns the compliance prompt. Brand owns the voice. Developers wire the connection – they don’t author the content
- Version history and rollback. A new prompt underperforms? One-step revert, no deploy cycle
- Lower token costs. Each agent pulls a targeted 200-token template instead of carrying a 2,000-token mega-prompt built to cover every scenario. That saves compounds on every invocation
All together now
These capabilities compound. Consider an expense approval workflow: The agent pulls its behavioral rules from a prompt templatea single source truth of no matter which team deployed the agent. When a submission is ambiguous (eg a large charge split across two cost centers), it uses elicitation to ask the submitter which allocation to apply. The response comes back as structured outputextracted into the exact shape your ERP expects before it touches the ledger. Three features, one workflow, zero guesswork.
Getting started
MCP Connector is now available in Anypoint Exchange. This is the adoption path that works best:
- Start with Elicitation: Pick your risk-prone workflows (where a wrong assumption costs real money). Add a confirmation gate to allow safety gains
- Enable Structured Output on your most-consumed tool. Eliminate the parsing layer. Your flows get validated objects instead of strings. Time saved compounds on every invocation
- Centralize your top prompts: Start with the three prompts that change most often or are duplicated across the most apps. Payoff grows with every agent that connects and reuses the prompt

