generate_response_summary
Compiles parsed email inquiries, configuration files, and report data into clear, actionable summary responses for trade surveillance support workflows.
Instructions
Generate a summary response for the user inquiry with all relevant information.
This tool combines all the gathered information into a clear, actionable
response that can be sent back to the user.
Args:
parsed_email: The parsed email inquiry data
config_files: List of config files that were used
report_path: Path to the generated report file
Returns:
A formatted summary string ready to send to the user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parsed_email | Yes | ||
| config_files | Yes | ||
| report_path | Yes |
Implementation Reference
- trade_surveillance_mcp/server.py:476-517 (handler)The core handler function for the 'generate_response_summary' tool. It is decorated with @mcp.tool(), which also serves as its registration in the MCP server. The function generates a formatted response summary based on parsed email data, config files used, and the generated report path.@mcp.tool() async def generate_response_summary( parsed_email: dict[str, Any], config_files: list[str], report_path: str ) -> str: """ Generate a summary response for the user inquiry with all relevant information. This tool combines all the gathered information into a clear, actionable response that can be sent back to the user. Args: parsed_email: The parsed email inquiry data config_files: List of config files that were used report_path: Path to the generated report file Returns: A formatted summary string ready to send to the user """ summary = f""" Trade Surveillance Support - Response Summary ============================================== Inquiry Type: {parsed_email.get('inquiry_type', 'Unknown')} Priority: {parsed_email.get('priority', 'Medium')} Actions Taken: - Analyzed inquiry email - Located {len(config_files)} relevant configuration files - Generated report: {report_path} Next Steps: {chr(10).join(f"- {action}" for action in parsed_email.get('suggested_actions', []))} Report Location: {report_path} Please review the generated report and let me know if you need any additional information. """ logger.info("Generated response summary") return summary.strip()