Answer order support questions with MCP and RAG in RustClaw
A customer can ask where an order is and who pays to return a defective item in the same message. This walkthrough connects a sample order server and a returns handbook, then checks that one Agent reply can use both sources.
Connect sample orders and import a returns handbook
- Set up the read-only MCP order server. Look up order
3and verify that it is in transit with tracking number7898047967. - Download and import the sample Returns Handbook. Name the library Returns Handbook. In Memory → Knowledge base, search for return shipping and check that the passage from section 3.2 appears.
Ask about shipping status and the return policy together
Send the following message in Agent chat. The prompt supplies the condition that support has confirmed the defect. The order server supplies the shipping record, and the handbook supplies the return shipping rule.
“Where is order 3, and what is its tracking number? If customer support has confirmed a defect, who pays to send the item back? Use the Returns Handbook for the policy and cite its section.”
Verify the shipment and the policy citation
- Shipment
- Order 3 is in transit at the Hangzhou sorting center with tracking number
7898047967. - Return shipping
- The seller pays for return shipping once support confirms the defect, as stated in Returns Handbook, section 3.2, “Defective-item returns.”
For a follow-up, ask “According to the Returns Handbook, how many days after the warehouse receives a return must the refund be issued?” The sample handbook omits that deadline, so the reply should say the handbook does not specify it.
When the reply covers only one part of the question
- The reply cites a policy and leaves out the shipment
- Run the MCP connection and tool checks, then look up order 3 on its own to verify the order tool is available.
- The reply gives a shipment and leaves out the citation
- Follow the knowledge base import and search steps. Confirm the library name, search for return shipping, and ask the agent to include the document name and section.