def METHOD_NAME(self, operation, parameters, mode):
    data_name = parameters['data_name']
    # 4. create MessageContent
    message_content = self.ontoagent.MessageContent(self.generate_id('MessageContent', extra_info=data_name),
                                                    namespace=self.this_agent)
    # 5. attach the MessageContent to the operation
    if mode == 'input':
        operation.hasInput.append(message_content)
    else:
        operation.hasOutput.append(message_content)
    message_part = self.create_a_message_part(parameters)
    # 8. connect MessagePart to MessageContent
    message_content.hasMandatoryPart.append(message_part)
    if 'has_qualifier' in parameters:
        qualifier_name_list = parameters['has_qualifier']
        qualifiers_list = []
        for qualifier_name in qualifier_name_list:
            if qualifier_name in self.qualifiers_dict:
                qualifier_object = self.qualifiers_dict[qualifier_name]
                qualifier_message_part = self.create_a_message_part(qualifier_object)
                qualifiers_list.append(qualifier_message_part)
        message_part.hasQualifier = qualifiers_list