generate_response_summary
Compile gathered trade surveillance data into a clear, actionable response summary for user inquiries.
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 handler function for the 'generate_response_summary' tool. It formats a response summary using the provided parsed email data, list of config files, and report path. The @mcp.tool() decorator registers this function as an MCP tool. Input schema is defined by type hints and docstring (parsed_email: dict[str, Any], config_files: list[str], report_path: str) -> str.@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()